From af900c88030922e779b45c808f83e7618c4465ac Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 14:56:03 -0500 Subject: [PATCH 01/13] Update env-configuration.md update for v0.4.8 list of env vars --- .../advanced-topics/env-configuration.md | 1215 ++++++++++------- 1 file changed, 746 insertions(+), 469 deletions(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index e4c3550..b3729ef 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -6,12 +6,13 @@ title: "🌍 Environment Variable Configuration" ## Overview -Open WebUI provides a range of environment variables that allow you to customize and configure +Open WebUI provides a large range of environment variables that allow you to customize and configure various aspects of the application. This page serves as a comprehensive reference for all available -environment variables, including their types, default values, and descriptions. +environment variables, providing their types, default values, and descriptions. +As new variables are introduced, this page will be updated to reflect the growing configuration options. :::info -Last updated: v0.3.20 +This page is up to date with Open Web UI release version [v0.4.8](https://github.com/open-webui/open-webui/releases/tag/v0.4.8), but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions. ::: ## App/Backend @@ -37,7 +38,7 @@ environment variables, see our [logging documentation](https://docs.openwebui.co #### `WEBUI_AUTH` - Type: `bool` -- Default Setting: `True` +- Default: `True` - Description: This setting enables or disables authentication. :::danger @@ -63,7 +64,8 @@ directly. Ensure that no users are present in the database, if you intend to tur - Type: `int` - Default: `300` -- Description: Specifies the timeout duration in seconds for the aiohttp client. +- Description: Specifies the timeout duration in seconds for the aiohttp client. This impacts things +such as connections to Ollama and OpenAI endpoints. :::info This is the maximum amount of time the client will wait for a response before timing out. @@ -71,24 +73,6 @@ If set to an empty string (' '), the timeout will be set to `None`, effectively allowing the client to wait indefinitely. ::: -#### `DATA_DIR` - -- Type: `str` -- Default: `./data` -- Description: Specifies the base directory for data storage, including uploads, cache, vector database, etc. - -#### `FRONTEND_BUILD_DIR` - -- Type: `str` -- Default: `../build` -- Description: Specifies the location of the built frontend files. - -#### `STATIC_DIR` - -- Type: `str` -- Default: `./static` -- Description: Specifies the directory for static files, such as the favicon. - #### `CUSTOM_NAME` - Type: `str` @@ -111,62 +95,6 @@ This should **only** ever be set to `False` when [ENABLE_OAUTH_SIGNUP](https://d is also being used and set to `True`. Failure to do so will result in the inability to login. ::: -#### `ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION` - -- Type: `bool` -- Default: `True` -- Description: Bypass SSL Verification for RAG on Websites. - -#### `DEFAULT_MODELS` - -- Type: `str` -- Description: Sets a default Language Model. - -#### `DEFAULT_USER_ROLE` - -- Type: `str` (enum: `pending`, `user`, `admin`) -- Options: - - `pending` - New users are pending until their accounts are manually activated by an admin. - - `user` - New users are automatically activated with regular user permissions. - - `admin` - New users are automatically activated with administrator permissions. -- Default: `pending` -- Description: Sets the default role assigned to new users. - -#### `USER_PERMISSIONS_CHAT_DELETION` - -- Type: `bool` -- Default: `True` -- Description: Toggles user permission to delete chats. - -#### `USER_PERMISSIONS_CHAT_EDITING` - -- Type: `bool` -- Default: `True` -- Description: Toggles user permission to edit chats. - -#### `USER_PERMISSIONS_CHAT_TEMPORARY` - -- Type: `bool` -- Default: `True` -- Description: Toggles user permission to create temporary chats. - -#### `ENABLE_MODEL_FILTER` - -- Type: `bool` -- Default: `False` -- Description: Toggles Language Model filtering. - -#### `MODEL_FILTER_LIST` - -- Type: `str` -- Description: Sets the Language Model filter list, semicolon-separated -- Example: `llama3.1:instruct;gemma2:latest` - -#### `WEBHOOK_URL` - -- Type: `str` -- Description: Sets a webhook for integration with Slack/Microsoft Teams. - #### `ENABLE_ADMIN_EXPORT` - Type: `bool` @@ -191,6 +119,36 @@ is also being used and set to `True`. Failure to do so will result in the inabil - Default: `True` - Description: Enables message rating feature. +#### `OFFLINE_MODE` + +- Type: `bool` +- Description: Enables or disables offline mode. + +#### `DEFAULT_MODELS` + +- Type: `str` +- Description: Sets a default Language Model. + +#### `BYPASS_MODEL_ACCESS_CONTROL` + +- Type: `bool` +- Description: Bypasses model access control. + +#### `DEFAULT_USER_ROLE` + +- Type: `str` (enum: `pending`, `user`, `admin`) +- Options: + - `pending` - New users are pending until their accounts are manually activated by an admin. + - `user` - New users are automatically activated with regular user permissions. + - `admin` - New users are automatically activated with administrator permissions. +- Default: `pending` +- Description: Sets the default role assigned to new users. + +#### `WEBHOOK_URL` + +- Type: `str` +- Description: Sets a webhook for integration with Slack/Microsoft Teams. + #### `WEBUI_BUILD_HASH` - Type: `str` @@ -238,53 +196,6 @@ is also being used and set to `True`. Failure to do so will result in the inabil - Description: Builds the Docker image with NVIDIA CUDA support. Enables GPU acceleration for local Whisper and embeddings. -#### `DATABASE_URL` - -- Type: `str` -- Default: `sqlite:///${DATA_DIR}/webui.db` -- Description: Specifies the database URL to connect to. - -:::info -Supports SQLite and Postgres. Changing the URL does not migrate data between databases. -Documentation on URL scheme available [here](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). -::: - -#### `DATABASE_POOL_SIZE` - -- Type: `int` -- Default: `0` -- Description: Specifies the size of the database pool. A value of `0` disables pooling. - -#### `DATABASE_POOL_MAX_OVERFLOW` - -- Type: `int` -- Default: `0` -- Description: Specifies the database pool max overflow. - -:::info -More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.max_overflow). -::: - -#### `DATABASE_POOL_TIMEOUT` - -- Type: `int` -- Default: `30` -- Description: Specifies the database pool timeout in seconds to get a connection. - -:::info -More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.timeout). -::: - -#### `DATABASE_POOL_RECYCLE` - -- Type: `int` -- Default: `3600` -- Description: Specifies the database pool recycle time in seconds. - -:::info -More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#setting-pool-recycle). -::: - #### `PORT` - Type: `int` @@ -295,24 +206,12 @@ More information about this setting can be found [here](https://docs.sqlalchemy. If installed via Python, you must instead pass `--port` as a command line argument. ::: -#### `RESET_CONFIG_ON_START` - -- Type: `bool` -- Default: `False` -- Description: Resets the `config.json` file on startup. - #### `DEFAULT_LOCALE` - Type: `str` - Default: `en` - Description: Sets the default locale for the application. -#### `FUNCTIONS_DIR` - -- Type: `str` -- Default: `./functions` -- Description: Specifies the directory for custom functions. - #### `SHOW_ADMIN_DETAILS` - Type: `bool` @@ -324,64 +223,36 @@ If installed via Python, you must instead pass `--port` as a command line argume - Type: `str` - Description: Sets the admin email shown by `SHOW_ADMIN_DETAILS` -#### `SAFE_MODE` - -- Type: `bool` -- Default: `False` -- Description: Enables safe mode, which disables potentially unsafe features, deactivating all functions. - -#### `ENABLE_FORWARD_USER_INFO_HEADERS` - -- type: `bool` -- Default: `False` -- Description: Forwards user information (name, id, email, and role) as X-headers to OpenAI API. -If enabled, the following headers are forwarded: - - `X-OpenWebUI-User-Name` - - `X-OpenWebUI-User-Id` - - `X-OpenWebUI-User-Email` - - `X-OpenWebUI-User-Role` - -#### `WEBUI_SESSION_COOKIE_SAME_SITE` - -- Type: `str` (enum: `lax`, `strict`, `none`) -- Options: - - `lax` - Sets the `SameSite` attribute to lax, allowing session cookies to be sent with -requests initiated by third-party websites. - - `strict` - Sets the `SameSite` attribute to strict, blocking session cookies from being sent -with requests initiated by third-party websites. - - `none` - Sets the `SameSite` attribute to none, allowing session cookies to be sent with -requests initiated by third-party websites, but only over HTTPS. -- Default: `lax` -- Description: Sets the `SameSite` attribute for session cookies. - -#### `WEBUI_SESSION_COOKIE_SECURE` - -- Type: `bool` -- Default: `False` -- Description: Sets the `Secure` attribute for session cookies if set to `True`. - -#### `CONTENT_SECURITY_POLICY` - -- Type: `str` -- Description: Sets the `content-security-policy` HTTP header -- Example: `default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' https://* data:; child-src 'none'; font-src 'self' data:; worker-src 'self';` - -#### `AIOHTTP_CLIENT_TIMEOUT` - -- Type: `int` -- Description: Sets the timeout in seconds for internal aiohttp connections. This impacts things -such as connections to Ollama and OpenAI endpoints. - #### `AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST` - Type: `int` - Description: Sets the timeout in seconds for fetching the OpenAI model list. This can be useful in cases where network latency requires a longer timeout duration to successfully retrieve the model list. +### Directories + +#### `DATA_DIR` + +- Type: `str` +- Default: `./data` +- Description: Specifies the base directory for data storage, including uploads, cache, vector database, etc. + #### `FONTS_DIR` - Type: `str` - Description: Specifies the directory for fonts. +#### `FRONTEND_BUILD_DIR` + +- Type: `str` +- Default: `../build` +- Description: Specifies the location of the built frontend files. + +#### `STATIC_DIR` + +- Type: `str` +- Default: `./static` +- Description: Specifies the directory for static files, such as the favicon. + ### Ollama #### `ENABLE_OLLAMA_API` @@ -482,22 +353,6 @@ Artificial Intelligence in Healthcare Prompt: {{prompt:middletruncate:8000}} ``` -#### `SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE` - -- Type: `str` -- Description: Prompt to use when generating search queries. -- Default: - -``` -Assess the need for a web search based on the current question and prior interactions, but lean towards suggesting a Google search query if uncertain. Generate a Google search query even when the answer might be straightforward, as additional information may enhance comprehension or provide updated data. If absolutely certain that no further information is required, return an empty string. Default to a search query if unsure or in doubt. Today's date is {{CURRENT_DATE}}. - -Current Question: -{{prompt:end:4000}} - -Interaction History: -{{MESSAGES:END:6}} -``` - #### `TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE` - Type: `str` @@ -508,13 +363,137 @@ Interaction History: Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. If a function tool matches, construct and return a JSON object in the format {\"name\": \"functionName\", \"parameters\": {\"requiredFunctionParamKey\": \"requiredFunctionParamValue\"}} using the appropriate tool and its parameters. Only return the object and limit the response to the JSON object without additional text. ``` +### Autocomplete + +#### `ENABLE_AUTOCOMPLETE_GENERATION` + +- Type: `bool` +- Description: Enables or disables autocomplete generation. + +#### `AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH` + +- Type: `int` +- Description: Sets the maximum input length for autocomplete generation. + +#### `AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE` + +- Type: `str` +- Description: Sets the prompt template for autocomplete generation. + +### Evaluation Arena Model + +#### `ENABLE_EVALUATION_ARENA_MODELS` + +- Type: `bool` +- Description: Enables or disables evaluation arena models. + +### Tags Generation + +#### `ENABLE_TAGS_GENERATION` + +- Type: `bool` +- Description: Enables or disables tags generation. + +#### `TAGS_GENERATION_PROMPT_TEMPLATE` + +- Type: `str` +- Description: Sets the prompt template for tags generation. + +## Security Variables + +#### `ENABLE_FORWARD_USER_INFO_HEADERS` + +- type: `bool` +- Default: `False` +- Description: Forwards user information (name, id, email, and role) as X-headers to OpenAI API. +If enabled, the following headers are forwarded: + - `X-OpenWebUI-User-Name` + - `X-OpenWebUI-User-Id` + - `X-OpenWebUI-User-Email` + - `X-OpenWebUI-User-Role` + +#### `ENABLE_RAG_LOCAL_WEB_FETCH` + +- Type: `bool` +- Default: `False` +- Description: Enables local web fetching for RAG. Enabling this allows Server Side Request +Forgery attacks against local network resources. + +#### `ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION` + +- Type: `bool` +- Default: `True` +- Description: Bypass SSL Verification for RAG on Websites. + +#### `WEBUI_SESSION_COOKIE_SAME_SITE` + +- Type: `str` (enum: `lax`, `strict`, `none`) +- Options: + - `lax` - Sets the `SameSite` attribute to lax, allowing session cookies to be sent with +requests initiated by third-party websites. + - `strict` - Sets the `SameSite` attribute to strict, blocking session cookies from being sent +with requests initiated by third-party websites. + - `none` - Sets the `SameSite` attribute to none, allowing session cookies to be sent with +requests initiated by third-party websites, but only over HTTPS. +- Default: `lax` +- Description: Sets the `SameSite` attribute for session cookies. + +#### `WEBUI_SESSION_COOKIE_SECURE` + +- Type: `bool` +- Default: `False` +- Description: Sets the `Secure` attribute for session cookies if set to `True`. + +#### `RESET_CONFIG_ON_START` + +- Type: `bool` +- Default: `False` +- Description: Resets the `config.json` file on startup. + +#### `SAFE_MODE` + +- Type: `bool` +- Default: `False` +- Description: Enables safe mode, which disables potentially unsafe features, deactivating all functions. + #### `CORS_ALLOW_ORIGIN` - Type: `str` - Default: `*` - Description: Sets the allowed origins for Cross-Origin Resource Sharing (CORS). -### RAG +#### `RAG_EMBEDDING_MODEL_TRUST_REMOTE_CODE` + +- Type: `bool` +- Default: `False` +- Description: Determines whether or not to allow custom models defined on the Hub in their own modeling files. + +#### `RAG_RERANKING_MODEL_TRUST_REMOTE_CODE` + +- Type: `bool` +- Default: `False` +- Description: Determines whether or not to allow custom models defined on the Hub in their own +modeling files for reranking. + +#### `RAG_EMBEDDING_MODEL_AUTO_UPDATE` + +- Type: `bool` +- Default: `False` +- Description: Toggles automatic update of the Sentence-Transformer model. + +#### `RAG_RERANKING_MODEL_AUTO_UPDATE` + +- Type: `bool` +- Default: `False` +- Description: Toggles automatic update of the reranking model. + +#### `WHISPER_MODEL_AUTO_UPDATE` + +- Type: `bool` +- Default: `False` +- Description: Toggles automatic update of the Whisper model. + +## Retrieval Augmented Generation (RAG) #### `VECTOR_DB` @@ -522,6 +501,177 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. - Default: `chroma` - Description: Specifies which vector database system to use, either 'chroma' for ChromaDB or 'milvus' for Milvus. This setting determines which vector storage system will be used for managing embeddings. +#### `RAG_EMBEDDING_ENGINE` + +- Type: `str` (enum: `ollama`, `openai`) +- Options: + - Leave empty for `Default (SentenceTransformers)` - Uses SentenceTransformers for embeddings. + - `ollama` - Uses the Ollama API for embeddings. + - `openai` - Uses the OpenAI API for embeddings. +- Description: Selects an embedding engine to use for RAG. + +#### `RAG_EMBEDDING_MODEL` + +- Type: `str` +- Default: `sentence-transformers/all-MiniLM-L6-v2` +- Description: Sets a model for embeddings. Locally, a Sentence-Transformer model is used. + +#### `ENABLE_RAG_HYBRID_SEARCH` + +- Type: `bool` +- Default: `False` +- Description: Enables the use of ensemble search with `BM25` + `ChromaDB`, with reranking using +`sentence_transformers` models. + +#### `CONTENT_EXTRACTION_ENGINE` + +- Type: `str` (`tika`) +- Options: + - Leave empty to use default + - `tika` - Use a local Apache Tika server +- Description: Sets the content extraction engine to use for document ingestion. + +#### `TIKA_SERVER_URL` + +- Type: `str` +- Default: `http://localhost:9998` +- Description: Sets the URL for the Apache Tika server. + +#### `RAG_TOP_K` + +- Type: `int` +- Default: `5` +- Description: Sets the default number of results to consider when using RAG. + +#### `RAG_RELEVANCE_THRESHOLD` + +- Type: `float` +- Default: `0.0` +- Description: Sets the relevance threshold to consider for documents when used with reranking. + +#### `RAG_TEMPLATE` + +- Type: `str` +- Default: + +``` +You are given a user query, some textual context and rules, all inside xml tags. You have to answer the query based on the context while respecting the rules. + +<context> +[context] +</context> + +<rules> +- If you don't know, just say so. +- If you are not sure, ask for clarification. +- Answer in the same language as the user query. +- If the context appears unreadable or of poor quality, tell the user then answer as best as you can. +- If the answer is not in the context but you think you know the answer, explain that to the user then answer with your own knowledge. +- Answer directly and without using xml tags. +</rules> + +<user_query> +[query] +</user_query> +``` + +- Description: Template to use when injecting RAG documents into chat completion + +#### `RAG_TEXT_SPLITTER` + +- Type: `str` +- Description: Sets the text splitter for RAG models. + +#### `TIKTOKEN_CACHE_DIR` + +- Type: `str` +- Description: Sets the directory for TikiToken cache. + +#### `TIKTOKEN_ENCODING_NAME` + +- Type: `str` +- Description: Sets the encoding name for TikiToken. + +#### `CHUNK_SIZE` + +- Type: `int` +- Default: `1500` +- Description: Sets the document chunk size for embeddings. + +#### `CHUNK_OVERLAP` + +- Type: `int` +- Default: `100` +- Description: Specifies how much overlap there should be between chunks. + +#### `PDF_EXTRACT_IMAGES` + +- Type: `bool` +- Default: `False` +- Description: Extracts images from PDFs using OCR when loading documents. + +#### `RAG_FILE_MAX_SIZE` + +- Type: `int` +- Default: `100` (100MB) +- Description: Sets the maximum size of a file that can be uploaded for document ingestion. + +#### `RAG_FILE_MAX_COUNT` + +- Type: `int` +- Default: `10` +- Description: Sets the maximum number of files that can be uploaded at once for document ingestion. + +#### `RAG_RERANKING_MODEL` + +- Type: `str` +- Description: Sets a model for reranking results. Locally, a Sentence-Transformer model is used. + +#### `RAG_OPENAI_API_BASE_URL` + +- Type: `str` +- Default: `${OPENAI_API_BASE_URL}` +- Description: Sets the OpenAI base API URL to use for RAG embeddings. + +#### `RAG_OPENAI_API_KEY` + +- Type: `str` +- Default: `${OPENAI_API_KEY}` +- Description: Sets the OpenAI API key to use for RAG embeddings. + +#### `RAG_EMBEDDING_OPENAI_BATCH_SIZE` + +- Type: `int` +- Default: `1` +- Description: Sets the batch size for OpenAI embeddings. + +#### `RAG_EMBEDDING_BATCH_SIZE` + +- Type: `int` +- Description: Sets the batch size for embedding in RAG (Retrieval-Augmented Generator) models. + +#### `RAG_OLLAMA_API_KEY` + +- Type: `str` +- Description: Sets the API key for Ollama API used in RAG models. + +#### `RAG_OLLAMA_BASE_URL` + +- Type: `str` +- Description: Sets the base URL for Ollama API used in RAG models. + +#### `ENABLE_RETRIEVAL_QUERY_GENERATION` + +- Type: `bool` +- Description: Enables or disables retrieval query generation. + +#### `QUERY_GENERATION_PROMPT_TEMPLATE` + +- Type: `str` +- Description: Sets the prompt template for query generation. + +### ChromaDB + #### `CHROMA_TENANT` - Type: `str` @@ -569,186 +719,62 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. - Description: Specifies auth credentials for remote ChromaDB Server. - Example: `username:password` +### Milvus + #### `MILVUS_URI` - Type: `str` - Default: `${DATA_DIR}/vector_db/milvus.db` - Description: Specifies the URI for connecting to the Milvus vector database. This can point to a local or remote Milvus server based on the deployment configuration. -#### `RAG_TOP_K` +### OpenSearch -- Type: `int` -- Default: `5` -- Description: Sets the default number of results to consider when using RAG. - -#### `RAG_RELEVANCE_THRESHOLD` - -- Type: `float` -- Default: `0.0` -- Description: Sets the relevance threshold to consider for documents when used with reranking. - -#### `ENABLE_RAG_HYBRID_SEARCH` +#### `OPENSEARCH_CERT_VERIFY` - Type: `bool` - Default: `False` -- Description: Enables the use of ensemble search with `BM25` + `ChromaDB`, with reranking using -`sentence_transformers` models. +- Description: Enables or disables OpenSearch certificate verification. -#### `ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION` - -- Type: `bool` -- Default: `True` -- Description: Enables TLS certification verification when browsing web pages for RAG. - -#### `RAG_EMBEDDING_ENGINE` - -- Type: `str` (enum: `ollama`, `openai`) -- Options: - - Leave empty for `Default (SentenceTransformers)` - Uses SentenceTransformers for embeddings. - - `ollama` - Uses the Ollama API for embeddings. - - `openai` - Uses the OpenAI API for embeddings. -- Description: Selects an embedding engine to use for RAG. - -#### `PDF_EXTRACT_IMAGES` - -- Type: `bool` -- Default: `False` -- Description: Extracts images from PDFs using OCR when loading documents. - -#### `RAG_EMBEDDING_MODEL` +#### `OPENSEARCH_PASSWORD` - Type: `str` -- Default: `sentence-transformers/all-MiniLM-L6-v2` -- Description: Sets a model for embeddings. Locally, a Sentence-Transformer model is used. +- Description: Sets the password for OpenSearch. -#### `RAG_EMBEDDING_MODEL_AUTO_UPDATE` +#### `OPENSEARCH_SSL` - Type: `bool` -- Default: `False` -- Description: Toggles automatic update of the Sentence-Transformer model. +- Description: Enables or disables SSL for OpenSearch. -#### `RAG_EMBEDDING_MODEL_TRUST_REMOTE_CODE` - -- Type: `bool` -- Default: `False` -- Description: Determines whether or not to allow custom models defined on the Hub in their own modeling files. - -#### `RAG_TEMPLATE` +#### `OPENSEARCH_URI` - Type: `str` -- Default: +- Description: Sets the URI for OpenSearch. -``` -You are given a user query, some textual context and rules, all inside xml tags. You have to answer the query based on the context while respecting the rules. - -<context> -[context] -</context> - -<rules> -- If you don't know, just say so. -- If you are not sure, ask for clarification. -- Answer in the same language as the user query. -- If the context appears unreadable or of poor quality, tell the user then answer as best as you can. -- If the answer is not in the context but you think you know the answer, explain that to the user then answer with your own knowledge. -- Answer directly and without using xml tags. -</rules> - -<user_query> -[query] -</user_query> -``` - -- Description: Template to use when injecting RAG documents into chat completion - -#### `RAG_RERANKING_MODEL` +#### `OPENSEARCH_USERNAME` - Type: `str` -- Description: Sets a model for reranking results. Locally, a Sentence-Transformer model is used. +- Description: Sets the username for OpenSearch. -#### `RAG_RERANKING_MODEL_AUTO_UPDATE` +### PGVector -- Type: `bool` -- Default: `False` -- Description: Toggles automatic update of the reranking model. - -#### `RAG_RERANKING_MODEL_TRUST_REMOTE_CODE` - -- Type: `bool` -- Default: `False` -- Description: Determines whether or not to allow custom models defined on the Hub in their own -modeling files for reranking. - -#### `RAG_OPENAI_API_BASE_URL` +#### `PGVECTOR_DB_URL` - Type: `str` -- Default: `${OPENAI_API_BASE_URL}` -- Description: Sets the OpenAI base API URL to use for RAG embeddings. +- Description: Sets the database URL for model storage. -#### `RAG_OPENAI_API_KEY` +### Qdrant + +#### `QDRANT_API_KEY` - Type: `str` -- Default: `${OPENAI_API_KEY}` -- Description: Sets the OpenAI API key to use for RAG embeddings. +- Description: Sets the API key for Qdrant. -#### `RAG_EMBEDDING_OPENAI_BATCH_SIZE` - -- Type: `int` -- Default: `1` -- Description: Sets the batch size for OpenAI embeddings. - -#### `ENABLE_RAG_LOCAL_WEB_FETCH` - -- Type: `bool` -- Default: `False` -- Description: Enables local web fetching for RAG. Enabling this allows Server Side Request -Forgery attacks against local network resources. - -#### `YOUTUBE_LOADER_LANGUAGE` +#### `QDRANT_URI` - Type: `str` -- Default: `en` -- Description: Sets the language to use for YouTube video loading. +- Description: Sets the URI for Qdrant. -#### `CHUNK_SIZE` - -- Type: `int` -- Default: `1500` -- Description: Sets the document chunk size for embeddings. - -#### `CHUNK_OVERLAP` - -- Type: `int` -- Default: `100` -- Description: Specifies how much overlap there should be between chunks. - -#### `CONTENT_EXTRACTION_ENGINE` - -- Type: `str` (`tika`) -- Options: - - Leave empty to use default - - `tika` - Use a local Apache Tika server -- Description: Sets the content extraction engine to use for document ingestion. - -#### `TIKA_SERVER_URL` - -- Type: `str` -- Default: `http://localhost:9998` -- Description: Sets the URL for the Apache Tika server. - -#### `RAG_FILE_MAX_COUNT` - -- Type: `int` -- Default: `10` -- Description: Sets the maximum number of files that can be uploaded at once for document ingestion. - -#### `RAG_FILE_MAX_SIZE` - -- Type: `int` -- Default: `100` (100MB) -- Description: Sets the maximum size of a file that can be uploaded for document ingestion. - -### Web Search +## Web Search #### `ENABLE_RAG_WEB_SEARCH` @@ -756,27 +782,28 @@ Forgery attacks against local network resources. - Default: `False` - Description: Enable web search toggle -#### `ENABLE_SEARCH_QUERY` +#### `ENABLE_SEARCH_QUERY_GENERATION` - Type: `bool` -- Default: `False` -- Description: Enables the generation of search queries from prompts +- Description: Enables or disables search query generation. #### `RAG_WEB_SEARCH_ENGINE` -- Type: `str` (enum: `searxng`, `google_pse`, `brave`, `serpstack`, `serper`, `serply`, `searchapi`, `duckduckgo`, `tavily`, `jina`) +- Type: `str` (enum: `searxng`, `google_pse`, `brave`, `kagi`, `mojeek`, `serpstack`, `serper`, `serply`, `searchapi`, `duckduckgo`, `tavily`, `jina`, `bing`) - Options: - `searxng` - Uses the [SearXNG](https://github.com/searxng/searxng) search engine. - `google_pse` - Uses the [Google Programmable Search Engine](https://programmablesearchengine.google.com/about/). - `brave` - Uses the [Brave search engine](https://brave.com/search/api/). - - `serpstack` - Uses the [Serpstack search engine](https://serpstack.com/). - - `serper` - Uses the [Serper search engine](https://serper.dev/). - - `serply` - Uses the [Serply search engine](https://serply.io/). - - `searchapi` - Uses the [SearchAPI search engine](https://www.searchapi.io/). - - `duckduckgo` - Uses the [DuckDuckGo search engine](https://duckduckgo.com/). - - `tavily` - Uses the [Tavily search engine](https://tavily.com/). - - `jina` - Uses the [Jina search engine](https://jina.ai/). -- Description: Select engine for performing searches + - `kagi` - Uses the [Kagi](https://www.kagi.com/) search engine. + - `mojeek` - Uses the [Mojeek](https://www.mojeek.com/) search engine. + - `serpstack` - Uses the [Serpstack](https://serpstack.com/) search engine. + - `serper` - Uses the [Serper](https://serper.dev/) search engine. + - `serply` - Uses the [Serply](https://serply.io/) search engine. + - `searchapi` - Uses the [SearchAPI](https://www.searchapi.io/) search engine. + - `duckduckgo` - Uses the [DuckDuckGo](https://duckduckgo.com/) search engine. + - `tavily` - Uses the [Tavily](https://tavily.com/) search engine. + - `jina` - Uses the [Jina](https://jina.ai/) search engine. + - `bing` - Uses the [Bing](https://www.bing.com/) search engine. #### `SEARXNG_QUERY_URL` @@ -799,6 +826,11 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: The API key for the Brave Search API. +#### `MOJEEK_SEARCH_API_KEY` + +- Type: `str` +- Description: Sets the API key for Mojiek Search API. + #### `SERPSTACK_API_KEY` - Type: `str` @@ -820,11 +852,36 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: The API key for the Serply search API. +#### `SEARCHAPI_API_KEY` + +- Type: `str` +- Description: Sets the SearchAPI API key. + +#### `SEARCHAPI_ENGINE` + +- Type: `str` +- Description: Sets the SearchAPI engine. + #### `TAVILY_API_KEY` - Type: `str` - Description: The API key for the Tavily search API. +#### `JINA_API_KEY` + +- Type: `str` +- Description: Sets the API key for Jina. + +#### `BING_SEARCH_V7_ENDPOINT` + +- Type: `str` +- Description: Sets the endpoint for Bing Search API. + +#### `BING_SEARCH_V7_SUBSCRIPTION_KEY` + +- Type: `str` +- Description: Sets the subscription key for Bing Search API. + #### `RAG_WEB_SEARCH_RESULT_COUNT` - Type: `int` @@ -837,43 +894,22 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `10` - Description: Number of concurrent requests to crawl web pages returned from search results. -#### `SEARCHAPI_API_KEY` +### YouTube Loader + +#### `YOUTUBE_LOADER_PROXY_URL` - Type: `str` -- Description: Sets the SearchAPI API key. +- Description: Sets the proxy URL for YouTube loader. -#### `SEARCHAPI_ENGINE` +#### `YOUTUBE_LOADER_LANGUAGE` - Type: `str` -- Description: Sets the SearchAPI engine. +- Default: `en` +- Description: Sets the language to use for YouTube video loading. -### Speech to Text +## Audio -#### `AUDIO_STT_ENGINE` - -- Type: `str` (enum: `openai`) -- Options: - - Leave empty to use local Whisper engine for Speech-to-Text. - - `openai` - Uses OpenAI engine for Speech-to-Text. -- Description: Specifies the Speech-to-Text engine to use. - -#### `AUDIO_STT_OPENAI_API_BASE_URL` - -- Type: `str` -- Default: `${OPENAI_API_BASE_URL}` -- Description: Sets the OpenAI-compatible base URL to use for Speech-to-Text. - -#### `AUDIO_STT_OPENAI_API_KEY` - -- Type: `str` -- Default: `${OPENAI_API_KEY}` -- Description: Sets the OpenAI API key to use for Speech-to-Text. - -#### `AUDIO_STT_MODEL` - -- Type: `str` -- Default: `whisper-1` -- Description: Specifies the Speech-to-Text model to use for OpenAI-compatible endpoints. +### Whisper Speech-to-Text (Local) #### `WHISPER_MODEL` @@ -887,13 +923,40 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `${DATA_DIR}/cache/whisper/models` - Description: Specifies the directory to store Whisper model files. -#### `WHISPER_MODEL_AUTO_UPDATE` +### Speech-to-Text (OpenAI) -- Type: `bool` -- Default: `False` -- Description: Toggles automatic update of the Whisper model. +#### `AUDIO_STT_ENGINE` -### Text to Speech +- Type: `str` (enum: `openai`) +- Options: + - Leave empty to use local Whisper engine for Speech-to-Text. + - `openai` - Uses OpenAI engine for Speech-to-Text. +- Description: Specifies the Speech-to-Text engine to use. + +#### `AUDIO_STT_MODEL` + +- Type: `str` +- Default: `whisper-1` +- Description: Specifies the Speech-to-Text model to use for OpenAI-compatible endpoints. + +#### `AUDIO_STT_OPENAI_API_BASE_URL` + +- Type: `str` +- Default: `${OPENAI_API_BASE_URL}` +- Description: Sets the OpenAI-compatible base URL to use for Speech-to-Text. + +#### `AUDIO_STT_OPENAI_API_KEY` + +- Type: `str` +- Default: `${OPENAI_API_KEY}` +- Description: Sets the OpenAI API key to use for Speech-to-Text. + +### Text-to-Speech + +#### `AUDIO_TTS_API_KEY` + +- Type: `str` +- Description: Sets the API key for Text-to-Speech. #### `AUDIO_TTS_ENGINE` @@ -904,10 +967,25 @@ the search query. Example: `http://searxng.local/search?q=<query>` - `openai` - Uses OpenAI engine for Text-to-Speech. - Description: Specifies the Text-to-Speech engine to use. -#### `AUDIO_TTS_API_KEY` +#### `AUDIO_TTS_MODEL` - Type: `str` -- Description: Sets the API key for Text-to-Speech. +- Default: `tts-1` +- Description: Specifies the OpenAI text-to-speech model to use. + +### Azure Text-to-Speech + +#### `AUDIO_TTS_AZURE_SPEECH_OUTPUT_FORMAT` + +- Type: `str` +- Description: Sets the output format for Azure Text to Speech. + +#### `AUDIO_TTS_AZURE_SPEECH_REGION` + +- Type: `str` +- Description: Sets the region for Azure Text to Speech. + +### OpenAI Text-to-Speech #### `AUDIO_TTS_OPENAI_API_BASE_URL` @@ -921,11 +999,11 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `${OPENAI_API_KEY}` - Description: Sets the API key to use for text-to-speech. -#### `AUDIO_TTS_MODEL` +#### `AUDIO_TTS_SPLIT_ON` - Type: `str` -- Default: `tts-1` -- Description: Specifies the OpenAI text-to-speech model to use. +- Default: `punctuation` +- Description: Sets the OpenAI text-to-speech split on to use. #### `AUDIO_TTS_VOICE` @@ -933,13 +1011,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `alloy` - Description: Sets the OpenAI text-to-speech voice to use. -#### `AUDIO_TTS_SPLIT_ON` - -- Type: `str` -- Default: `punctuation` -- Description: Sets the OpenAI text-to-speech split on to use. - -### Image Generation +## Image Generation #### `ENABLE_IMAGE_GENERATION` @@ -957,38 +1029,6 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `automatic1111` - Description: Specifies the engine to use for image generation. -#### `AUTOMATIC1111_BASE_URL` - -- Type: `str` -- Description: Specifies the URL to Automatic1111's Stable Diffusion API. - -#### `AUTOMATIC1111_API_AUTH` - -- Type: `str` -- Description: Sets the Automatic1111 API authentication. - -#### `COMFYUI_BASE_URL` - -- Type: `str` -- Description: Specifies the URL to the ComfyUI image generation API. - -#### `COMFYUI_WORKFLOW` - -- Type: `str` -- Description: Sets the ComfyUI workflow. - -#### `IMAGES_OPENAI_API_BASE_URL` - -- Type: `str` -- Default: `${OPENAI_API_BASE_URL}` -- Description: Sets the OpenAI-compatible base URL to use for DALL-E image generation. - -#### `IMAGES_OPENAI_API_KEY` - -- Type: `str` -- Default: `${OPENAI_API_KEY}` -- Description: Sets the API key to use for DALL-E image generation. - #### `IMAGE_GENERATION_MODEL` - Type: `str` @@ -1006,21 +1046,135 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `50` - Description: Sets the default iteration steps for image generation. Used for ComfyUI and AUTOMATIC1111. -### OAuth +### AUTOMATIC1111 + +#### `AUTOMATIC1111_API_AUTH` + +- Type: `str` +- Description: Sets the Automatic1111 API authentication. + +#### `AUTOMATIC1111_BASE_URL` + +- Type: `str` +- Description: Specifies the URL to Automatic1111's Stable Diffusion API. + +#### `AUTOMATIC1111_CFG_SCALE` + +- Type: `float` +- Description: Sets the scale for Automatic1111 inference. + +#### `AUTOMATIC1111_SAMPLER` + +- Type: `str` +- Description: Sets the sampler for Automatic1111 inference. + +#### `AUTOMATIC1111_SCHEDULER` + +- Type: `str` +- Description: Sets the scheduler for Automatic1111 inference. + +### ComfyUI + +#### `COMFYUI_BASE_URL` + +- Type: `str` +- Description: Specifies the URL to the ComfyUI image generation API. + +#### `COMFYUI_WORKFLOW` + +- Type: `str` +- Description: Sets the ComfyUI workflow. + +### OpenAI DALL-E + +#### `IMAGES_OPENAI_API_BASE_URL` + +- Type: `str` +- Default: `${OPENAI_API_BASE_URL}` +- Description: Sets the OpenAI-compatible base URL to use for DALL-E image generation. + +#### `IMAGES_OPENAI_API_KEY` + +- Type: `str` +- Default: `${OPENAI_API_KEY}` +- Description: Sets the API key to use for DALL-E image generation. + +## Database Pool + +#### `DATABASE_URL` + +- Type: `str` +- Default: `sqlite:///${DATA_DIR}/webui.db` +- Description: Specifies the database URL to connect to. + +:::info +Supports SQLite and Postgres. Changing the URL does not migrate data between databases. +Documentation on URL scheme available [here](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). +::: + +#### `DATABASE_POOL_SIZE` + +- Type: `int` +- Default: `0` +- Description: Specifies the size of the database pool. A value of `0` disables pooling. + +#### `DATABASE_POOL_MAX_OVERFLOW` + +- Type: `int` +- Default: `0` +- Description: Specifies the database pool max overflow. + +:::info +More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.max_overflow). +::: + +#### `DATABASE_POOL_TIMEOUT` + +- Type: `int` +- Default: `30` +- Description: Specifies the database pool timeout in seconds to get a connection. + +:::info +More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.timeout). +::: + +#### `DATABASE_POOL_RECYCLE` + +- Type: `int` +- Default: `3600` +- Description: Specifies the database pool recycle time in seconds. + +:::info +More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#setting-pool-recycle). +::: + +## OAuth #### `ENABLE_OAUTH_SIGNUP` - Type: `bool` - Default: `False` -- Description: Enables user account creation via OAuth. +- Description: Enables user account creation via OAuth. Distinct from `ENABLE_SIGNUP`. + +#### `ENABLE_API_KEY` + +- Type: `bool` +- Default: `False` +- Description: Enables API key authentication. + +#### `ENABLE_OAUTH_ROLE_MANAGEMENT` + +- Type: `bool` +- Default: `False` +- Description: Enables role management to oauth delegation. #### `OAUTH_MERGE_ACCOUNTS_BY_EMAIL` - Type: `bool` - Default: `False` - Description: If enabled, merges OAuth accounts with existing accounts using the same email -address. This is considered unsafe as providers may not verify email addresses and can lead to -account takeovers. +address. This is considered unsafe as not all OAuth providers will verify email addresses and can lead to +potential account takeovers. #### `OAUTH_USERNAME_CLAIM` @@ -1062,12 +1216,6 @@ account takeovers. - Default: `SSO` - Description: Sets the name for the OIDC provider. -#### `ENABLE_OAUTH_ROLE_MANAGEMENT` - -- Type: `bool` -- Default: `False` -- Description: Enables role management to oauth delegation. - #### `OAUTH_ROLES_CLAIM` - Type: `str` @@ -1143,33 +1291,110 @@ account takeovers. - Type: `str` - Description: Sets the redirect URI for OIDC -### Tools +## LDAP -#### `TOOLS_DIR` - -- Type: `str` -- Default: `${DATA_DIR}/tools` -- Description: Specifies the directory for custom tools. - -### Redis - -#### `ENABLE_WEBSOCKET_SUPPORT` +#### `ENABLE_LDAP` - Type: `bool` -- Default: `False` -- Description: Enables websocket support in Open WebUI (used with Redis). +- Description: Enables or disables LDAP authentication. -#### `WEBSOCKET_MANAGER` +#### `LDAP_APP_DN` - Type: `str` -- Default: `redis` -- Description: Specifies the websocket manager to use (in this case, Redis). +- Description: Sets the distinguished name for LDAP application. -#### `WEBSOCKET_REDIS_URL` +#### `LDAP_APP_PASSWORD` - Type: `str` -- Default: `redis://localhost:6379/0` -- Description: Specifies the URL of the Redis instance for websocket communication. +- Description: Sets the password for LDAP application. + +#### `LDAP_ATTRIBUTE_FOR_USERNAME` + +- Type: `str` +- Description: Sets the attribute to use as username for LDAP authentication. + +#### `LDAP_CA_CERT_FILE` + +- Type: `str` +- Description: Sets the path to LDAP CA certificate file. + +#### `LDAP_CIPHERS` + +- Type: `str` +- Description: Sets the ciphers to use for LDAP connection. + +#### `LDAP_SEARCH_BASE` + +- Type: `str` +- Description: Sets the base to search for LDAP authentication. + +#### `LDAP_SEARCH_FILTER` + +- Type: `str` +- Description: Sets the filter to use for LDAP search. + +#### `LDAP_SERVER_HOST` + +- Type: `str` +- Description: Sets the hostname of LDAP server. + +#### `LDAP_SERVER_LABEL` + +- Type: `str` +- Description: Sets the label of LDAP server. + +#### `LDAP_SERVER_PORT` + +- Type: `int` +- Description: Sets the port number of LDAP server. + +#### `LDAP_USE_TLS` + +- Type: `bool` +- Description: Enables or disables TLS for LDAP connection. + +## User Permissions + +#### `USER_PERMISSIONS_CHAT_TEMPORARY` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to create temporary chats. + +#### `USER_PERMISSIONS_CHAT_DELETE` + +- Type: `bool` +- Description: Enables or disables user permission to delete chats. + +#### `USER_PERMISSIONS_CHAT_EDIT` + +- Type: `bool` +- Description: Enables or disables user permission to edit chats. + +#### `USER_PERMISSIONS_CHAT_FILE_UPLOAD` + +- Type: `bool` +- Description: Enables or disables user permission to upload files to chats. + +#### `USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS` + +- Type: `bool` +- Description: Enables or disables user permission to access workspace knowledge. + +#### `USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS` + +- Type: `bool` +- Description: Enables or disables user permission to access workspace models. + +#### `USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS` + +- Type: `bool` +- Description: Enables or disables user permission to access workspace prompts. + +#### `USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS` + +- Type: `bool` +- Description: Enables or disables user permission to access workspace tools. ## Misc Environment Variables @@ -1196,3 +1421,55 @@ Open WebUI uses the following environment variables: - Description: Lists domain extensions (or IP addresses) for which the proxy should not be used, separated by commas. For example, setting no_proxy to '.mit.edu' ensures that the proxy is bypassed when accessing documents from MIT. + +### Redis + +#### `ENABLE_WEBSOCKET_SUPPORT` + +- Type: `bool` +- Default: `False` +- Description: Enables websocket support in Open WebUI (used with Redis). + +#### `WEBSOCKET_MANAGER` + +- Type: `str` +- Default: `redis` +- Description: Specifies the websocket manager to use (in this case, Redis). + +#### `WEBSOCKET_REDIS_URL` + +- Type: `str` +- Default: `redis://localhost:6379/0` +- Description: Specifies the URL of the Redis instance for websocket communication. + +### S3 Storage Provider + +#### `STORAGE_PROVIDER` + +- Type: `str` +- Description: Sets the storage provider. + +#### `S3_ACCESS_KEY_ID` + +- Type: `str` +- Description: Sets the access key ID for S3 storage. + +#### `S3_BUCKET_NAME` + +- Type: `str` +- Description: Sets the bucket name for S3 storage. + +#### `S3_ENDPOINT_URL` + +- Type: `str` +- Description: Sets the endpoint URL for S3 storage. + +#### `S3_REGION_NAME` + +- Type: `str` +- Description: Sets the region name for S3 storage. + +#### `S3_SECRET_ACCESS_KEY` + +- Type: `str` +- Description: Sets the secret access key for S3 storage. From 077c2fe62623c3c0aff16305236fed9ad83caf89 Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:00:20 -0500 Subject: [PATCH 02/13] Update env-configuration.md will this work --- .../advanced-topics/env-configuration.md | 515 ++++++++++-------- 1 file changed, 300 insertions(+), 215 deletions(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index b3729ef..cca5b2d 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -12,7 +12,7 @@ environment variables, providing their types, default values, and descriptions. As new variables are introduced, this page will be updated to reflect the growing configuration options. :::info -This page is up to date with Open Web UI release version [v0.4.8](https://github.com/open-webui/open-webui/releases/tag/v0.4.8), but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions. +This page is up to date with Open WebUI release version [v0.5.1](https://github.com/open-webui/open-webui/releases/tag/v0.5.1), but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions. ::: ## App/Backend @@ -35,18 +35,10 @@ environment variables, see our [logging documentation](https://docs.openwebui.co - **Docker Default**: `prod` - Description: Environment setting. -#### `WEBUI_AUTH` +#### `CUSTOM_NAME` -- Type: `bool` -- Default: `True` -- Description: This setting enables or disables authentication. - -:::danger -If set to `False`, authentication will be disabled for your Open WebUI instance. However, it's -important to note that turning off authentication is only possible for fresh installations without -any existing users. If there are already users registered, you cannot disable authentication -directly. Ensure that no users are present in the database, if you intend to turn off `WEBUI_AUTH`. -::: +- Type: `str` +- Description: Sets `WEBUI_NAME` but polls **api.openwebui.com** for metadata. #### `WEBUI_NAME` @@ -60,24 +52,16 @@ directly. Ensure that no users are present in the database, if you intend to tur - Default: `http://localhost:3000` - Description: Specifies the URL where the Open WebUI is reachable. Currently used for search engine support. -#### `AIOHTTP_CLIENT_TIMEOUT` +#### `PORT` - Type: `int` -- Default: `300` -- Description: Specifies the timeout duration in seconds for the aiohttp client. This impacts things -such as connections to Ollama and OpenAI endpoints. +- Default: `8080` +- Description: Sets the port to run Open WebUI from. :::info -This is the maximum amount of time the client will wait for a response before timing out. -If set to an empty string (' '), the timeout will be set to `None`, effectively disabling the timeout and -allowing the client to wait indefinitely. +If installed via Python, you must instead pass `--port` as a command line argument. ::: -#### `CUSTOM_NAME` - -- Type: `str` -- Description: Sets `WEBUI_NAME` but polls **api.openwebui.com** for metadata. - #### `ENABLE_SIGNUP` - Type: `bool` @@ -107,33 +91,34 @@ is also being used and set to `True`. Failure to do so will result in the inabil - Default: `True` - Description: Enables admin users to access all chats. -#### `ENABLE_COMMUNITY_SHARING` +#### `ENABLE_CHANNELS` + +- Type: `bool` +- Default: `False` +- Description: Enables or disables channel support. + +#### `ADMIN_EMAIL` + +- Type: `str` +- Description: Sets the admin email shown by `SHOW_ADMIN_DETAILS` + +#### `SHOW_ADMIN_DETAILS` - Type: `bool` - Default: `True` -- Description: Controls whether users are shown the share to community button. +- Description: Toggles whether to show admin user details in the interface. -#### `ENABLE_MESSAGE_RATING` +#### `BYPASS_MODEL_ACCESS_CONTROL` - Type: `bool` -- Default: `True` -- Description: Enables message rating feature. - -#### `OFFLINE_MODE` - -- Type: `bool` -- Description: Enables or disables offline mode. +- Default: `False` +- Description: Bypasses model access control. #### `DEFAULT_MODELS` - Type: `str` - Description: Sets a default Language Model. -#### `BYPASS_MODEL_ACCESS_CONTROL` - -- Type: `bool` -- Description: Bypasses model access control. - #### `DEFAULT_USER_ROLE` - Type: `str` (enum: `pending`, `user`, `admin`) @@ -144,6 +129,12 @@ is also being used and set to `True`. Failure to do so will result in the inabil - Default: `pending` - Description: Sets the default role assigned to new users. +#### `DEFAULT_LOCALE` + +- Type: `str` +- Default: `en` +- Description: Sets the default locale for the application. + #### `WEBHOOK_URL` - Type: `str` @@ -165,24 +156,6 @@ is also being used and set to `True`. Failure to do so will result in the inabil [{"id": "string","type": "string [info, success, warning, error]","title": "string","content": "string","dismissible": False,"timestamp": 1000}] ``` -#### `WEBUI_AUTH_TRUSTED_EMAIL_HEADER` - -- Type: `str` -- Description: Defines the trusted request header for authentication. See [SSO docs](/features/sso). - -#### `WEBUI_AUTH_TRUSTED_NAME_HEADER` - -- Type: `str` -- Description: Defines the trusted request header for the username of anyone registering with the -`WEBUI_AUTH_TRUSTED_EMAIL_HEADER` header. See [SSO docs](/features/sso). - -#### `WEBUI_SECRET_KEY` - -- Type: `str` -- Default: `t0p-s3cr3t` -- Docker Default: Randomly generated on first start -- Description: Overrides the randomly generated string used for JSON Web Token. - #### `JWT_EXPIRES_IN` - Type: `int` @@ -196,33 +169,21 @@ is also being used and set to `True`. Failure to do so will result in the inabil - Description: Builds the Docker image with NVIDIA CUDA support. Enables GPU acceleration for local Whisper and embeddings. -#### `PORT` +### AIOHTTP Client + +#### `AIOHTTP_CLIENT_TIMEOUT` - Type: `int` -- Default: `8080` -- Description: Sets the port to run Open WebUI from. +- Default: `300` +- Description: Specifies the timeout duration in seconds for the aiohttp client. This impacts things +such as connections to Ollama and OpenAI endpoints. :::info -If installed via Python, you must instead pass `--port` as a command line argument. +This is the maximum amount of time the client will wait for a response before timing out. +If set to an empty string (' '), the timeout will be set to `None`, effectively disabling the timeout and +allowing the client to wait indefinitely. ::: -#### `DEFAULT_LOCALE` - -- Type: `str` -- Default: `en` -- Description: Sets the default locale for the application. - -#### `SHOW_ADMIN_DETAILS` - -- Type: `bool` -- Default: `True` -- Description: Toggles whether to show admin user details in the interface. - -#### `ADMIN_EMAIL` - -- Type: `str` -- Description: Sets the admin email shown by `SHOW_ADMIN_DETAILS` - #### `AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST` - Type: `int` @@ -261,7 +222,7 @@ If installed via Python, you must instead pass `--port` as a command line argume - Default: `True` - Description: Enables the use of Ollama APIs. -#### `OLLAMA_BASE_URL` +#### `OLLAMA_BASE_URL` (`OLLAMA_API_BASE_URL` is depreciated) - Type: `str` - Default: `http://localhost:11434` @@ -286,6 +247,7 @@ If installed via Python, you must instead pass `--port` as a command line argume #### `K8S_FLAG` - Type: `bool` +- Default: `False` - Description: If set, assumes Helm chart deployment and sets [`OLLAMA_BASE_URL`](#ollama_base_url) to `http://ollama-service.open-webui.svc.cluster.local:11434` ### OpenAI @@ -368,6 +330,7 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. #### `ENABLE_AUTOCOMPLETE_GENERATION` - Type: `bool` +- Default: `False` - Description: Enables or disables autocomplete generation. #### `AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH` @@ -385,13 +348,27 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. #### `ENABLE_EVALUATION_ARENA_MODELS` - Type: `bool` +- Default: `True` - Description: Enables or disables evaluation arena models. +#### `ENABLE_MESSAGE_RATING` + +- Type: `bool` +- Default: `True` +- Description: Enables message rating feature. + +#### `ENABLE_COMMUNITY_SHARING` + +- Type: `bool` +- Default: `True` +- Description: Controls whether users are shown the share to community button. + ### Tags Generation #### `ENABLE_TAGS_GENERATION` - Type: `bool` +- Default: `True` - Description: Enables or disables tags generation. #### `TAGS_GENERATION_PROMPT_TEMPLATE` @@ -444,6 +421,32 @@ requests initiated by third-party websites, but only over HTTPS. - Default: `False` - Description: Sets the `Secure` attribute for session cookies if set to `True`. +#### `WEBUI_AUTH` + +- Type: `bool` +- Default: `True` +- Description: This setting enables or disables authentication. + +:::danger +If set to `False`, authentication will be disabled for your Open WebUI instance. However, it's +important to note that turning off authentication is only possible for fresh installations without +any existing users. If there are already users registered, you cannot disable authentication +directly. Ensure that no users are present in the database, if you intend to turn off `WEBUI_AUTH`. +::: + +#### `WEBUI_SECRET_KEY` + +- Type: `str` +- Default: `t0p-s3cr3t` +- Docker Default: Randomly generated on first start +- Description: Overrides the randomly generated string used for JSON Web Token. + +#### `OFFLINE_MODE` + +- Type: `bool` +- Default: `False` +- Description: Enables or disables offline mode. + #### `RESET_CONFIG_ON_START` - Type: `bool` @@ -531,12 +534,6 @@ modeling files for reranking. - `tika` - Use a local Apache Tika server - Description: Sets the content extraction engine to use for document ingestion. -#### `TIKA_SERVER_URL` - -- Type: `str` -- Default: `http://localhost:9998` -- Description: Sets the URL for the Apache Tika server. - #### `RAG_TOP_K` - Type: `int` @@ -663,6 +660,7 @@ You are given a user query, some textual context and rules, all inside xml tags. #### `ENABLE_RETRIEVAL_QUERY_GENERATION` - Type: `bool` +- Default: `True` - Description: Enables or disables retrieval query generation. #### `QUERY_GENERATION_PROMPT_TEMPLATE` @@ -670,6 +668,14 @@ You are given a user query, some textual context and rules, all inside xml tags. - Type: `str` - Description: Sets the prompt template for query generation. +### Apache Tika + +#### `TIKA_SERVER_URL` + +- Type: `str` +- Default: `http://localhost:9998` +- Description: Sets the URL for the Apache Tika server. + ### ChromaDB #### `CHROMA_TENANT` @@ -719,6 +725,24 @@ You are given a user query, some textual context and rules, all inside xml tags. - Description: Specifies auth credentials for remote ChromaDB Server. - Example: `username:password` +### Google Drive + +#### `ENABLE_GOOGLE_DRIVE_INTEGRATION` + +- Type: `bool` +- Default: `False` +- Description: Enables or disables Google Drive integration. + +#### `GOOGLE_DRIVE_API_KEY` + +- Type: `str` +- Description: Sets the API key for Google Drive integration. + +#### `GOOGLE_DRIVE_CLIENT_ID` + +- Type: `str` +- Description: Sets the client ID for Google Drive integration. + ### Milvus #### `MILVUS_URI` @@ -743,6 +767,7 @@ You are given a user query, some textual context and rules, all inside xml tags. #### `OPENSEARCH_SSL` - Type: `bool` +- Default: `False` - Description: Enables or disables SSL for OpenSearch. #### `OPENSEARCH_URI` @@ -785,8 +810,21 @@ You are given a user query, some textual context and rules, all inside xml tags. #### `ENABLE_SEARCH_QUERY_GENERATION` - Type: `bool` +- Default: `True` - Description: Enables or disables search query generation. +#### `RAG_WEB_SEARCH_RESULT_COUNT` + +- Type: `int` +- Default: `3` +- Description: Maximum number of search results to crawl. + +#### `RAG_WEB_SEARCH_CONCURRENT_REQUESTS` + +- Type: `int` +- Default: `10` +- Description: Number of concurrent requests to crawl web pages returned from search results. + #### `RAG_WEB_SEARCH_ENGINE` - Type: `str` (enum: `searxng`, `google_pse`, `brave`, `kagi`, `mojeek`, `serpstack`, `serper`, `serply`, `searchapi`, `duckduckgo`, `tavily`, `jina`, `bing`) @@ -814,7 +852,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `GOOGLE_PSE_API_KEY` - Type: `str` -- Description: The API key for the Google Programmable Search Engine (PSE) service. +- Description: Sets the API key for the Google Programmable Search Engine (PSE) service. #### `GOOGLE_PSE_ENGINE_ID` @@ -824,7 +862,12 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `BRAVE_SEARCH_API_KEY` - Type: `str` -- Description: The API key for the Brave Search API. +- Description: Sets the API key for the Brave Search API. + +#### `KAGI_SEARCH_API_KEY` + +- Type: `str` +- Description: Sets the API key for Kagi Search API. #### `MOJEEK_SEARCH_API_KEY` @@ -834,7 +877,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `SERPSTACK_API_KEY` - Type: `str` -- Description: The API key for Serpstack search API. +- Description: Sets the API key for Serpstack search API. #### `SERPSTACK_HTTPS` @@ -845,17 +888,17 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `SERPER_API_KEY` - Type: `str` -- Description: The API key for the Serper search API. +- Description: Sets the API key for Serper search API. #### `SERPLY_API_KEY` - Type: `str` -- Description: The API key for the Serply search API. +- Description: Sets the API key for Serply search API. #### `SEARCHAPI_API_KEY` - Type: `str` -- Description: Sets the SearchAPI API key. +- Description: Sets the API key for SearchAPI. #### `SEARCHAPI_ENGINE` @@ -865,7 +908,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `TAVILY_API_KEY` - Type: `str` -- Description: The API key for the Tavily search API. +- Description: Sets the API key for Tavily search API. #### `JINA_API_KEY` @@ -882,18 +925,6 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Sets the subscription key for Bing Search API. -#### `RAG_WEB_SEARCH_RESULT_COUNT` - -- Type: `int` -- Default: `3` -- Description: Maximum number of search results to crawl. - -#### `RAG_WEB_SEARCH_CONCURRENT_REQUESTS` - -- Type: `int` -- Default: `10` -- Description: Number of concurrent requests to crawl web pages returned from search results. - ### YouTube Loader #### `YOUTUBE_LOADER_PROXY_URL` @@ -1080,6 +1111,11 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Specifies the URL to the ComfyUI image generation API. +#### `COMFYUI_API_KEY` + +- Type: `str` +- Description: Sets the API key for ComfyUI. + #### `COMFYUI_WORKFLOW` - Type: `str` @@ -1099,62 +1135,13 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `${OPENAI_API_KEY}` - Description: Sets the API key to use for DALL-E image generation. -## Database Pool - -#### `DATABASE_URL` - -- Type: `str` -- Default: `sqlite:///${DATA_DIR}/webui.db` -- Description: Specifies the database URL to connect to. - -:::info -Supports SQLite and Postgres. Changing the URL does not migrate data between databases. -Documentation on URL scheme available [here](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). -::: - -#### `DATABASE_POOL_SIZE` - -- Type: `int` -- Default: `0` -- Description: Specifies the size of the database pool. A value of `0` disables pooling. - -#### `DATABASE_POOL_MAX_OVERFLOW` - -- Type: `int` -- Default: `0` -- Description: Specifies the database pool max overflow. - -:::info -More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.max_overflow). -::: - -#### `DATABASE_POOL_TIMEOUT` - -- Type: `int` -- Default: `30` -- Description: Specifies the database pool timeout in seconds to get a connection. - -:::info -More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.timeout). -::: - -#### `DATABASE_POOL_RECYCLE` - -- Type: `int` -- Default: `3600` -- Description: Specifies the database pool recycle time in seconds. - -:::info -More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#setting-pool-recycle). -::: - ## OAuth #### `ENABLE_OAUTH_SIGNUP` - Type: `bool` - Default: `False` -- Description: Enables user account creation via OAuth. Distinct from `ENABLE_SIGNUP`. +- Description: Enables account creation when sighting up via OAuth. Distinct from `ENABLE_SIGNUP`. #### `ENABLE_API_KEY` @@ -1168,6 +1155,12 @@ More information about this setting can be found [here](https://docs.sqlalchemy. - Default: `False` - Description: Enables role management to oauth delegation. +#### `ENABLE_OAUTH_GROUP_MANAGEMENT` + +- Type: `bool` +- Default: `False` +- Description: Enables or disables OAUTH group management. + #### `OAUTH_MERGE_ACCOUNTS_BY_EMAIL` - Type: `bool` @@ -1194,15 +1187,16 @@ potential account takeovers. - Default: `picture` - Description: Set picture (avatar) claim for OpenID. -#### `OAUTH_CLIENT_ID` +#### `OAUTH_GROUP_CLAIM` - Type: `str` -- Description: Sets the client ID for OIDC +- Description: Specifies the group claim for OAUTH authentication. -#### `OAUTH_CLIENT_SECRET` +#### `OAUTH_ROLES_CLAIM` - Type: `str` -- Description: Sets the client secret for OIDC +- Default: `roles` +- Description: Sets the roles claim to look for in the OIDC token. #### `OAUTH_SCOPES` @@ -1210,17 +1204,10 @@ potential account takeovers. - Default: `openid email profile` - Description: Sets the scope for OIDC authentication. `openid` and `email` are required. -#### `OAUTH_PROVIDER_NAME` +#### `OAUTH_ALLOWED_DOMAINS` - Type: `str` -- Default: `SSO` -- Description: Sets the name for the OIDC provider. - -#### `OAUTH_ROLES_CLAIM` - -- Type: `str` -- Default: `roles` -- Description: Sets the roles claim to look for in the OIDC token. +- Description: Specifies the allowed domains for OAUTH authentication. (e.g. "example1.com,example2.com"). #### `OAUTH_ALLOWED_ROLES` @@ -1234,6 +1221,21 @@ potential account takeovers. - Default: `admin` - Description: Sets the roles that are considered administrators. +#### `WEBUI_AUTH_TRUSTED_EMAIL_HEADER` + +- Type: `str` +- Description: Defines the trusted request header for authentication. See [SSO docs](/features/sso). + +#### `WEBUI_AUTH_TRUSTED_NAME_HEADER` + +- Type: `str` +- Description: Defines the trusted request header for the username of anyone registering with the +`WEBUI_AUTH_TRUSTED_EMAIL_HEADER` header. See [SSO docs](/features/sso). + +### Google + +See https://support.google.com/cloud/answer/6158849?hl=en + #### `GOOGLE_CLIENT_ID` - Type: `str` @@ -1253,8 +1255,13 @@ potential account takeovers. #### `GOOGLE_REDIRECT_URI` - Type: `str` +- Default: `<backend>/oauth/google/callback` - Description: Sets the redirect URI for Google OAuth +### Microsoft + +See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app + #### `MICROSOFT_CLIENT_ID` - Type: `str` @@ -1279,16 +1286,36 @@ potential account takeovers. #### `MICROSOFT_REDIRECT_URI` - Type: `str` +- Default: `<backend>/oauth/microsoft/callback` - Description: Sets the redirect URI for Microsoft OAuth +### OpenID (OIDC) + +#### `OAUTH_CLIENT_ID` + +- Type: `str` +- Description: Sets the client ID for OIDC + +#### `OAUTH_CLIENT_SECRET` + +- Type: `str` +- Description: Sets the client secret for OIDC + #### `OPENID_PROVIDER_URL` - Type: `str` - Description: Path to the `.well-known/openid-configuration` endpoint +#### `OAUTH_PROVIDER_NAME` + +- Type: `str` +- Default: `SSO` +- Description: Sets the name for the OIDC provider. + #### `OPENID_REDIRECT_URI` - Type: `str` +- Default: `<backend>/oauth/oidc/callback` - Description: Sets the redirect URI for OIDC ## LDAP @@ -1296,6 +1323,7 @@ potential account takeovers. #### `ENABLE_LDAP` - Type: `bool` +- Default: `False` - Description: Enables or disables LDAP authentication. #### `LDAP_APP_DN` @@ -1351,6 +1379,7 @@ potential account takeovers. #### `LDAP_USE_TLS` - Type: `bool` +- Default: `False` - Description: Enables or disables TLS for LDAP connection. ## User Permissions @@ -1361,88 +1390,53 @@ potential account takeovers. - Default: `True` - Description: Enables or disables user permission to create temporary chats. -#### `USER_PERMISSIONS_CHAT_DELETE` - -- Type: `bool` -- Description: Enables or disables user permission to delete chats. - #### `USER_PERMISSIONS_CHAT_EDIT` - Type: `bool` +- Default: `True` - Description: Enables or disables user permission to edit chats. +#### `USER_PERMISSIONS_CHAT_DELETE` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to delete chats. + #### `USER_PERMISSIONS_CHAT_FILE_UPLOAD` - Type: `bool` +- Default: `True` - Description: Enables or disables user permission to upload files to chats. #### `USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS` - Type: `bool` +- Default: `True` - Description: Enables or disables user permission to access workspace knowledge. #### `USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS` - Type: `bool` +- Default: `True` - Description: Enables or disables user permission to access workspace models. #### `USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS` - Type: `bool` +- Default: `True` - Description: Enables or disables user permission to access workspace prompts. #### `USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS` - Type: `bool` +- Default: `True` - Description: Enables or disables user permission to access workspace tools. ## Misc Environment Variables These variables are not specific to Open WebUI but can still be valuable in certain contexts. -### Proxy Settings - -Open WebUI supports using proxies for HTTP and HTTPS retrievals. To specify proxy settings, -Open WebUI uses the following environment variables: - -#### `http_proxy` - -- Type: `str` -- Description: Sets the URL for the HTTP proxy. - -#### `https_proxy` - -- Type: `str` -- Description: Sets the URL for the HTTPS proxy. - -#### `no_proxy` - -- Type: `str` -- Description: Lists domain extensions (or IP addresses) for which the proxy should not be used, -separated by commas. For example, setting no_proxy to '.mit.edu' ensures that the proxy is -bypassed when accessing documents from MIT. - -### Redis - -#### `ENABLE_WEBSOCKET_SUPPORT` - -- Type: `bool` -- Default: `False` -- Description: Enables websocket support in Open WebUI (used with Redis). - -#### `WEBSOCKET_MANAGER` - -- Type: `str` -- Default: `redis` -- Description: Specifies the websocket manager to use (in this case, Redis). - -#### `WEBSOCKET_REDIS_URL` - -- Type: `str` -- Default: `redis://localhost:6379/0` -- Description: Specifies the URL of the Redis instance for websocket communication. - -### S3 Storage Provider +### Amazon S3 Storage #### `STORAGE_PROVIDER` @@ -1473,3 +1467,94 @@ bypassed when accessing documents from MIT. - Type: `str` - Description: Sets the secret access key for S3 storage. + +### Database Pool + +#### `DATABASE_URL` + +- Type: `str` +- Default: `sqlite:///${DATA_DIR}/webui.db` +- Description: Specifies the database URL to connect to. + +:::info +Supports SQLite and Postgres. Changing the URL does not migrate data between databases. +Documentation on URL scheme available [here](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). +::: + +#### `DATABASE_POOL_SIZE` + +- Type: `int` +- Default: `0` +- Description: Specifies the size of the database pool. A value of `0` disables pooling. + +#### `DATABASE_POOL_MAX_OVERFLOW` + +- Type: `int` +- Default: `0` +- Description: Specifies the database pool max overflow. + +:::info +More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.max_overflow). +::: + +#### `DATABASE_POOL_TIMEOUT` + +- Type: `int` +- Default: `30` +- Description: Specifies the database pool timeout in seconds to get a connection. + +:::info +More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.timeout). +::: + +#### `DATABASE_POOL_RECYCLE` + +- Type: `int` +- Default: `3600` +- Description: Specifies the database pool recycle time in seconds. + +:::info +More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#setting-pool-recycle). +::: + +### Redis + +#### `ENABLE_WEBSOCKET_SUPPORT` + +- Type: `bool` +- Default: `False` +- Description: Enables websocket support in Open WebUI (used with Redis). + +#### `WEBSOCKET_MANAGER` + +- Type: `str` +- Default: `redis` +- Description: Specifies the websocket manager to use (in this case, Redis). + +#### `WEBSOCKET_REDIS_URL` (`REDIS_URL` exists for potential future use cases. In practice, it is recommended to set both.) + +- Type: `str` +- Default: `redis://localhost:6379/0` +- Description: Specifies the URL of the Redis instance for websocket communication. + +### Proxy Settings + +Open WebUI supports using proxies for HTTP and HTTPS retrievals. To specify proxy settings, +Open WebUI uses the following environment variables: + +#### `http_proxy` + +- Type: `str` +- Description: Sets the URL for the HTTP proxy. + +#### `https_proxy` + +- Type: `str` +- Description: Sets the URL for the HTTPS proxy. + +#### `no_proxy` + +- Type: `str` +- Description: Lists domain extensions (or IP addresses) for which the proxy should not be used, +separated by commas. For example, setting no_proxy to '.mit.edu' ensures that the proxy is +bypassed when accessing documents from MIT. From 51b35a7d2f707c522c8b432dc06a0d37958a930f Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:30:21 -0500 Subject: [PATCH 03/13] update #342 --- docs/features/rag.md | 4 ++++ .../advanced-topics/env-configuration.md | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/features/rag.md b/docs/features/rag.md index c71c616..6128c01 100644 --- a/docs/features/rag.md +++ b/docs/features/rag.md @@ -44,3 +44,7 @@ The dedicated RAG pipeline for summarizing YouTube videos via video URLs enables ## Document Parsing A variety of parsers extract content from local and remote documents. For more, see the [`get_loader`](https://github.com/open-webui/open-webui/blob/2fa94956f4e500bf5c42263124c758d8613ee05e/backend/apps/rag/main.py#L328) function. + +## Google Drive Integration + +When paired with a Google Cloud project that has the Google Picker API and Google Drive API enabled, this feature allows users to directly access their Drive files from the chat interface and upload documents, slides, sheets and more and uploads them as context to your chat. Can be enabled `Admin Panel` > `Settings` > `Documents` menu. Must set [`GOOGLE_DRIVE_API_KEY and GOOGLE_DRIVE_CLIENT_ID`](https://github.com/open-webui/docs/blob/main/docs/getting-started/advanced-topics/env-configuration.md) environment variables to use. \ No newline at end of file diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index cca5b2d..08e0a66 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -731,18 +731,18 @@ You are given a user query, some textual context and rules, all inside xml tags. - Type: `bool` - Default: `False` -- Description: Enables or disables Google Drive integration. +- Description: Enables or disables Google Drive integration. If set to true, and `GOOGLE_DRIVE_CLIENT_ID` & `GOOGLE_DRIVE_API_KEY` are both configured, Google Drive will appear as an upload option in the chat UI. + +#### `GOOGLE_DRIVE_CLIENT_ID` + +- Type: `str` +- Description: Sets the client ID for Google Drive (client must be configured with Drive API and Picker API enabled). #### `GOOGLE_DRIVE_API_KEY` - Type: `str` - Description: Sets the API key for Google Drive integration. -#### `GOOGLE_DRIVE_CLIENT_ID` - -- Type: `str` -- Description: Sets the client ID for Google Drive integration. - ### Milvus #### `MILVUS_URI` From 2bd01c03845bc38efc213c9ec7ca726d8c12b48e Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:09:51 -0500 Subject: [PATCH 04/13] Update env-configuration.md --- .../advanced-topics/env-configuration.md | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index 08e0a66..b609df2 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -1382,37 +1382,7 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Default: `False` - Description: Enables or disables TLS for LDAP connection. -## User Permissions - -#### `USER_PERMISSIONS_CHAT_TEMPORARY` - -- Type: `bool` -- Default: `True` -- Description: Enables or disables user permission to create temporary chats. - -#### `USER_PERMISSIONS_CHAT_EDIT` - -- Type: `bool` -- Default: `True` -- Description: Enables or disables user permission to edit chats. - -#### `USER_PERMISSIONS_CHAT_DELETE` - -- Type: `bool` -- Default: `True` -- Description: Enables or disables user permission to delete chats. - -#### `USER_PERMISSIONS_CHAT_FILE_UPLOAD` - -- Type: `bool` -- Default: `True` -- Description: Enables or disables user permission to upload files to chats. - -#### `USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS` - -- Type: `bool` -- Default: `True` -- Description: Enables or disables user permission to access workspace knowledge. +## Workspace Permissions #### `USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS` @@ -1420,6 +1390,12 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Default: `True` - Description: Enables or disables user permission to access workspace models. +#### `USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to access workspace knowledge. + #### `USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS` - Type: `bool` @@ -1432,6 +1408,32 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Default: `True` - Description: Enables or disables user permission to access workspace tools. +## Chat Permissions + +#### `USER_PERMISSIONS_CHAT_FILE_UPLOAD` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to upload files to chats. + +#### `USER_PERMISSIONS_CHAT_DELETE` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to delete chats. + +#### `USER_PERMISSIONS_CHAT_EDIT` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to edit chats. + +#### `USER_PERMISSIONS_CHAT_TEMPORARY` + +- Type: `bool` +- Default: `True` +- Description: Enables or disables user permission to create temporary chats. + ## Misc Environment Variables These variables are not specific to Open WebUI but can still be valuable in certain contexts. From 1a816f25b9c83f75109d3a28912608b4638d3eec Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:44:10 -0500 Subject: [PATCH 05/13] bump --- docs/features/rag.md | 2 +- .../advanced-topics/env-configuration.md | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/features/rag.md b/docs/features/rag.md index 6128c01..9f0cbb8 100644 --- a/docs/features/rag.md +++ b/docs/features/rag.md @@ -47,4 +47,4 @@ A variety of parsers extract content from local and remote documents. For more, ## Google Drive Integration -When paired with a Google Cloud project that has the Google Picker API and Google Drive API enabled, this feature allows users to directly access their Drive files from the chat interface and upload documents, slides, sheets and more and uploads them as context to your chat. Can be enabled `Admin Panel` > `Settings` > `Documents` menu. Must set [`GOOGLE_DRIVE_API_KEY and GOOGLE_DRIVE_CLIENT_ID`](https://github.com/open-webui/docs/blob/main/docs/getting-started/advanced-topics/env-configuration.md) environment variables to use. \ No newline at end of file +When paired with a Google Cloud project that has the Google Picker API and Google Drive API enabled, this feature allows users to directly access their Drive files from the chat interface and upload documents, slides, sheets and more and uploads them as context to your chat. Can be enabled `Admin Panel` > `Settings` > `Documents` menu. Must set [`GOOGLE_DRIVE_API_KEY and GOOGLE_DRIVE_CLIENT_ID`](https://github.com/open-webui/docs/blob/main/docs/getting-started/advanced-topics/env-configuration.md) environment variables to use. diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index b609df2..fcce91c 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -156,11 +156,20 @@ is also being used and set to `True`. Failure to do so will result in the inabil [{"id": "string","type": "string [info, success, warning, error]","title": "string","content": "string","dismissible": False,"timestamp": 1000}] ``` +:::note +When setting this environment variable in a `.env` file, make sure to escape the quotes by wrapping the entire value in double quotes and using escaped quotes (`\"`) for the inner quotes. Example: + +``` +WEBUI_BANNERS="[{\"id\": \"1\", \"type\": \"warning\", \"title\": \"Your messages are stored.\", \"content\": \"Your messages are stored and may be reviewed by human people. LLM's are prone to hallucinations, check sources.\", \"dismissible\": true, \"timestamp\": 1000}]" +``` + +::: + #### `JWT_EXPIRES_IN` - Type: `int` - Default: `-1` -- Description: Sets the JWT expiration time in seconds. A value of -1 disables expiration. +- Description: Sets the JWT expiration time in seconds. Valid time units: `s`, `m`, `h`, `d`, `w` or `-1` for no expiration. #### `USE_CUDA_DOCKER` @@ -222,7 +231,7 @@ allowing the client to wait indefinitely. - Default: `True` - Description: Enables the use of Ollama APIs. -#### `OLLAMA_BASE_URL` (`OLLAMA_API_BASE_URL` is depreciated) +#### `OLLAMA_BASE_URL` (`OLLAMA_API_BASE_URL` is depreciated) {#ollama_base_url} - Type: `str` - Default: `http://localhost:11434` From 8e560d3324bc8e5287e4912d212974304aa4e4fd Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 21:14:05 -0500 Subject: [PATCH 06/13] Update logging.md remove `LITELLM_LOG_LEVEL` --- docs/getting-started/advanced-topics/logging.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/getting-started/advanced-topics/logging.md b/docs/getting-started/advanced-topics/logging.md index 9b53dd5..796d16e 100644 --- a/docs/getting-started/advanced-topics/logging.md +++ b/docs/getting-started/advanced-topics/logging.md @@ -56,7 +56,6 @@ Some level of granularity is possible using any of the following combination of | `CONFIG_LOG_LEVEL` | Configuration handling | | `DB_LOG_LEVEL` | Internal Peewee Database | | `IMAGES_LOG_LEVEL` | AUTOMATIC1111 stable diffusion image generation | -| `LITELLM_LOG_LEVEL` | LiteLLM proxy | | `MAIN_LOG_LEVEL` | Main (root) execution | | `MODELS_LOG_LEVEL` | LLM model interaction, authentication, etc. | | `OLLAMA_LOG_LEVEL` | Ollama backend interaction | From bfae273dca52df0f507a3d4feb660141134b9493 Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Thu, 26 Dec 2024 21:55:54 -0500 Subject: [PATCH 07/13] Update env-configuration.md --- docs/getting-started/advanced-topics/env-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index fcce91c..ed0acad 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -881,7 +881,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `MOJEEK_SEARCH_API_KEY` - Type: `str` -- Description: Sets the API key for Mojiek Search API. +- Description: Sets the API key for Mojeek Search API. #### `SERPSTACK_API_KEY` From 7aeb119fc77c300152514db1aa2d002d06da4b22 Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Fri, 27 Dec 2024 00:53:15 -0500 Subject: [PATCH 08/13] Update env-configuration.md --- .../advanced-topics/env-configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index ed0acad..3b519f3 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -385,6 +385,23 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. - Type: `str` - Description: Sets the prompt template for tags generation. +### API Key Endpoint Restrictions + +#### `ENABLE_API_KEY_ENDPOINT_RESTRICTIONS` + +- Type: `bool` +- Default: `False` +- Description: Enables API key endpoint restrictions for added security and configurability. + +#### `API_KEY_ALLOWED_ENDPOINTS` + +- Type: `str` +- Description: Specifies a comma-separated list of allowed API endpoints when API key endpoint restrictions are enabled. + +:::note +The value of `API_KEY_ALLOWED_ENDPOINTS` should be a comma-separated list of endpoint URLs, such as `/api/v1/messages, /api/v1/channels`. +::: + ## Security Variables #### `ENABLE_FORWARD_USER_INFO_HEADERS` From 4001fa5f3f1e7a49bbdd85876c8124ee2995a28a Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Fri, 27 Dec 2024 01:32:25 -0500 Subject: [PATCH 09/13] Update env-configuration.md --- .../advanced-topics/env-configuration.md | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index 3b519f3..bb2b181 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -12,7 +12,9 @@ environment variables, providing their types, default values, and descriptions. As new variables are introduced, this page will be updated to reflect the growing configuration options. :::info + This page is up to date with Open WebUI release version [v0.5.1](https://github.com/open-webui/open-webui/releases/tag/v0.5.1), but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions. + ::: ## App/Backend @@ -59,7 +61,9 @@ environment variables, see our [logging documentation](https://docs.openwebui.co - Description: Sets the port to run Open WebUI from. :::info + If installed via Python, you must instead pass `--port` as a command line argument. + ::: #### `ENABLE_SIGNUP` @@ -75,8 +79,10 @@ If installed via Python, you must instead pass `--port` as a command line argume - Description: Toggles email, password, sign in and "or" (only when `ENABLE_OAUTH_SIGNUP` is set to True) elements. :::danger + This should **only** ever be set to `False` when [ENABLE_OAUTH_SIGNUP](https://docs.openwebui.com/getting-started/advanced-topics/env-configuration/#enable_oauth_signup) is also being used and set to `True`. Failure to do so will result in the inability to login. + ::: #### `ENABLE_ADMIN_EXPORT` @@ -156,7 +162,8 @@ is also being used and set to `True`. Failure to do so will result in the inabil [{"id": "string","type": "string [info, success, warning, error]","title": "string","content": "string","dismissible": False,"timestamp": 1000}] ``` -:::note +:::info + When setting this environment variable in a `.env` file, make sure to escape the quotes by wrapping the entire value in double quotes and using escaped quotes (`\"`) for the inner quotes. Example: ``` @@ -188,9 +195,11 @@ for local Whisper and embeddings. such as connections to Ollama and OpenAI endpoints. :::info + This is the maximum amount of time the client will wait for a response before timing out. If set to an empty string (' '), the timeout will be set to `None`, effectively disabling the timeout and allowing the client to wait indefinitely. + ::: #### `AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST` @@ -342,6 +351,12 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. - Default: `False` - Description: Enables or disables autocomplete generation. +:::info + +When enabling `ENABLE_AUTOCOMPLETE_GENERATION`, ensure that you also configure `AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH` and `AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE` accordingly. + +::: + #### `AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH` - Type: `int` @@ -399,7 +414,9 @@ Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. - Description: Specifies a comma-separated list of allowed API endpoints when API key endpoint restrictions are enabled. :::note + The value of `API_KEY_ALLOWED_ENDPOINTS` should be a comma-separated list of endpoint URLs, such as `/api/v1/messages, /api/v1/channels`. + ::: ## Security Variables @@ -454,10 +471,12 @@ requests initiated by third-party websites, but only over HTTPS. - Description: This setting enables or disables authentication. :::danger + If set to `False`, authentication will be disabled for your Open WebUI instance. However, it's important to note that turning off authentication is only possible for fresh installations without any existing users. If there are already users registered, you cannot disable authentication directly. Ensure that no users are present in the database, if you intend to turn off `WEBUI_AUTH`. + ::: #### `WEBUI_SECRET_KEY` @@ -645,6 +664,12 @@ You are given a user query, some textual context and rules, all inside xml tags. - Default: `10` - Description: Sets the maximum number of files that can be uploaded at once for document ingestion. +:::info + +When configuring `RAG_FILE_MAX_SIZE` and `RAG_FILE_MAX_COUNT`, ensure that the values are reasonable to prevent excessive file uploads and potential performance issues. + +::: + #### `RAG_RERANKING_MODEL` - Type: `str` @@ -759,6 +784,12 @@ You are given a user query, some textual context and rules, all inside xml tags. - Default: `False` - Description: Enables or disables Google Drive integration. If set to true, and `GOOGLE_DRIVE_CLIENT_ID` & `GOOGLE_DRIVE_API_KEY` are both configured, Google Drive will appear as an upload option in the chat UI. +:::info + +When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGLE_DRIVE_CLIENT_ID` and `GOOGLE_DRIVE_API_KEY` correctly, and have reviewed Google's terms of service and usage guidelines. + +::: + #### `GOOGLE_DRIVE_CLIENT_ID` - Type: `str` @@ -1169,6 +1200,12 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Default: `False` - Description: Enables account creation when sighting up via OAuth. Distinct from `ENABLE_SIGNUP`. +:::danger + +`ENABLE_LOGIN_FORM` must be set to `False` when `ENABLE_OAUTH_SIGNUP` is set to `True`. Failure to do so will result in the inability to login. + +::: + #### `ENABLE_API_KEY` - Type: `bool` @@ -1505,8 +1542,10 @@ These variables are not specific to Open WebUI but can still be valuable in cert - Description: Specifies the database URL to connect to. :::info + Supports SQLite and Postgres. Changing the URL does not migrate data between databases. Documentation on URL scheme available [here](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). + ::: #### `DATABASE_POOL_SIZE` @@ -1522,7 +1561,9 @@ Documentation on URL scheme available [here](https://docs.sqlalchemy.org/en/20/c - Description: Specifies the database pool max overflow. :::info + More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.max_overflow). + ::: #### `DATABASE_POOL_TIMEOUT` @@ -1532,7 +1573,9 @@ More information about this setting can be found [here](https://docs.sqlalchemy. - Description: Specifies the database pool timeout in seconds to get a connection. :::info + More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.timeout). + ::: #### `DATABASE_POOL_RECYCLE` @@ -1542,7 +1585,9 @@ More information about this setting can be found [here](https://docs.sqlalchemy. - Description: Specifies the database pool recycle time in seconds. :::info + More information about this setting can be found [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#setting-pool-recycle). + ::: ### Redis From a9acab2762d1d8d39c180ebb2a3a4aacf4b303de Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Fri, 27 Dec 2024 12:46:58 -0500 Subject: [PATCH 10/13] Update env-configuration.md PersistentConfig and additional defaults --- .../advanced-topics/env-configuration.md | 473 ++++++++++++++++-- 1 file changed, 438 insertions(+), 35 deletions(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index bb2b181..683d318 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -53,6 +53,7 @@ environment variables, see our [logging documentation](https://docs.openwebui.co - Type: `str` - Default: `http://localhost:3000` - Description: Specifies the URL where the Open WebUI is reachable. Currently used for search engine support. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `PORT` @@ -71,12 +72,14 @@ If installed via Python, you must instead pass `--port` as a command line argume - Type: `bool` - Default: `True` - Description: Toggles user account creation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_LOGIN_FORM` - Type: `bool` - Default: `True` - Description: Toggles email, password, sign in and "or" (only when `ENABLE_OAUTH_SIGNUP` is set to True) elements. +- Persistence: This environment variable is a `PersistentConfig` variable. :::danger @@ -102,17 +105,20 @@ is also being used and set to `True`. Failure to do so will result in the inabil - Type: `bool` - Default: `False` - Description: Enables or disables channel support. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ADMIN_EMAIL` - Type: `str` - Description: Sets the admin email shown by `SHOW_ADMIN_DETAILS` +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SHOW_ADMIN_DETAILS` - Type: `bool` - Default: `True` - Description: Toggles whether to show admin user details in the interface. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `BYPASS_MODEL_ACCESS_CONTROL` @@ -123,7 +129,9 @@ is also being used and set to `True`. Failure to do so will result in the inabil #### `DEFAULT_MODELS` - Type: `str` +- Default: empty string (' '), since `None` is set as default - Description: Sets a default Language Model. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `DEFAULT_USER_ROLE` @@ -134,17 +142,20 @@ is also being used and set to `True`. Failure to do so will result in the inabil - `admin` - New users are automatically activated with administrator permissions. - Default: `pending` - Description: Sets the default role assigned to new users. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `DEFAULT_LOCALE` - Type: `str` - Default: `en` - Description: Sets the default locale for the application. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `WEBHOOK_URL` - Type: `str` - Description: Sets a webhook for integration with Slack/Microsoft Teams. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `WEBUI_BUILD_HASH` @@ -162,6 +173,8 @@ is also being used and set to `True`. Failure to do so will result in the inabil [{"id": "string","type": "string [info, success, warning, error]","title": "string","content": "string","dismissible": False,"timestamp": 1000}] ``` +- Persistence: This environment variable is a `PersistentConfig` variable. + :::info When setting this environment variable in a `.env` file, make sure to escape the quotes by wrapping the entire value in double quotes and using escaped quotes (`\"`) for the inner quotes. Example: @@ -177,6 +190,7 @@ WEBUI_BANNERS="[{\"id\": \"1\", \"type\": \"warning\", \"title\": \"Your message - Type: `int` - Default: `-1` - Description: Sets the JWT expiration time in seconds. Valid time units: `s`, `m`, `h`, `d`, `w` or `-1` for no expiration. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USE_CUDA_DOCKER` @@ -239,6 +253,7 @@ allowing the client to wait indefinitely. - Type: `bool` - Default: `True` - Description: Enables the use of Ollama APIs. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OLLAMA_BASE_URL` (`OLLAMA_API_BASE_URL` is depreciated) {#ollama_base_url} @@ -255,6 +270,7 @@ allowing the client to wait indefinitely. - Type: `str` - Description: Configures load-balanced Ollama backend hosts, separated by `;`. See [`OLLAMA_BASE_URL`](#ollama_base_url). Takes precedence over[`OLLAMA_BASE_URL`](#ollama_base_url). +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USE_OLLAMA_DOCKER` @@ -275,6 +291,7 @@ allowing the client to wait indefinitely. - Type: `bool` - Default: `True` - Description: Enables the use of OpenAI APIs. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OPENAI_API_BASE_URL` @@ -287,6 +304,7 @@ allowing the client to wait indefinitely. - Type: `str` - Description: Supports balanced OpenAI base API URLs, semicolon-separated. - Example: `http://host-one:11434;http://host-two:11434` +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OPENAI_API_KEY` @@ -298,6 +316,7 @@ allowing the client to wait indefinitely. - Type: `str` - Description: Supports multiple OpenAI API keys, semicolon-separated. - Example: `sk-124781258123;sk-4389759834759834` +- Persistence: This environment variable is a `PersistentConfig` variable. ### Tasks @@ -306,21 +325,25 @@ allowing the client to wait indefinitely. - Type: `str` - Description: The default model to use for tasks such as title and web search query generation when using Ollama models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `TASK_MODEL_EXTERNAL` - Type: `str` - Description: The default model to use for tasks such as title and web search query generation when using OpenAI-compatible endpoints. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `TITLE_GENERATION_PROMPT_TEMPLATE` - Type: `str` - Description: Prompt to use when generating chat titles. -- Default: +- Default: The value of `DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE` environment variable. + +Template: ``` -Create a concise, 3-5 word title with an emoji as a title for the prompt in the given language. Suitable Emojis for the summary can be used to enhance understanding but avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT. +Create a concise, 3-5 word title with an emoji as a title for the chat history, in the given language. Suitable Emojis for the summary can be used to enhance understanding but avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT. Examples of titles: 📉 Stock Market Trends @@ -330,26 +353,34 @@ Remote Work Productivity Tips Artificial Intelligence in Healthcare 🎮 Video Game Development Insights -Prompt: {{prompt:middletruncate:8000}} +<chat_history> +{{MESSAGES:END:2}} ``` +- Persistence: This environment variable is a `PersistentConfig` variable. + #### `TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE` - Type: `str` - Description: Prompt to use when calling tools. -- Default: +- Default: The value of `DEFAULT_TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE` environment variable. + +Template: ``` Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. If a function tool matches, construct and return a JSON object in the format {\"name\": \"functionName\", \"parameters\": {\"requiredFunctionParamKey\": \"requiredFunctionParamValue\"}} using the appropriate tool and its parameters. Only return the object and limit the response to the JSON object without additional text. ``` +- Persistence: This environment variable is a `PersistentConfig` variable. + ### Autocomplete #### `ENABLE_AUTOCOMPLETE_GENERATION` - Type: `bool` -- Default: `False` +- Default: `True` - Description: Enables or disables autocomplete generation. +- Persistence: This environment variable is a `PersistentConfig` variable. :::info @@ -360,12 +391,62 @@ When enabling `ENABLE_AUTOCOMPLETE_GENERATION`, ensure that you also configure ` #### `AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH` - Type: `int` +- Default: `-1` - Description: Sets the maximum input length for autocomplete generation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE` - Type: `str` +- Default: The value of `DEFAULT_AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE` environment variable. + +Template: + +``` +### Task: +You are an autocompletion system. Continue the text in `<text>` based on the **completion type** in `<type>` and the given language. + +### **Instructions**: +1. Analyze `<text>` for context and meaning. +2. Use `<type>` to guide your output: + - **General**: Provide a natural, concise continuation. + - **Search Query**: Complete as if generating a realistic search query. +3. Start as if you are directly continuing `<text>`. Do **not** repeat, paraphrase, or respond as a model. Simply complete the text. +4. Ensure the continuation: + - Flows naturally from `<text>`. + - Avoids repetition, overexplaining, or unrelated ideas. +5. If unsure, return: `{ "text": "" }`. + +### **Output Rules**: +- Respond only in JSON format: `{ "text": "<your_completion>" }`. + +### **Examples**: +#### Example 1: +Input: +<type>General</type> +<text>The sun was setting over the horizon, painting the sky</text> +Output: +{ "text": "with vibrant shades of orange and pink." } + +#### Example 2: +Input: +<type>Search Query</type> +<text>Top-rated restaurants in</text> +Output: +{ "text": "New York City for Italian cuisine." } + +--- +### Context: +<chat_history> +{{MESSAGES:END:6}} +</chat_history> +<type>{{TYPE}}</type> +<text>{{PROMPT}}</text> +#### Output: +``` + - Description: Sets the prompt template for autocomplete generation. +- Persistence: This environment variable is a `PersistentConfig` variable. ### Evaluation Arena Model @@ -374,18 +455,21 @@ When enabling `ENABLE_AUTOCOMPLETE_GENERATION`, ensure that you also configure ` - Type: `bool` - Default: `True` - Description: Enables or disables evaluation arena models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_MESSAGE_RATING` - Type: `bool` - Default: `True` - Description: Enables message rating feature. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_COMMUNITY_SHARING` - Type: `bool` - Default: `True` - Description: Controls whether users are shown the share to community button. +- Persistence: This environment variable is a `PersistentConfig` variable. ### Tags Generation @@ -394,11 +478,37 @@ When enabling `ENABLE_AUTOCOMPLETE_GENERATION`, ensure that you also configure ` - Type: `bool` - Default: `True` - Description: Enables or disables tags generation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `TAGS_GENERATION_PROMPT_TEMPLATE` - Type: `str` +- Default: The value of `DEFAULT_TAGS_GENERATION_PROMPT_TEMPLATE` environment variable. + +Template: + +``` +### Task: +Generate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags. + +### Guidelines: +- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education) +- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation +- If content is too short (less than 3 messages) or too diverse, use only ["General"] +- Use the chat's primary language; default to English if multilingual +- Prioritize accuracy over specificity + +### Output: +JSON format: { "tags": ["tag1", "tag2", "tag3"] } + +### Chat History: +<chat_history> +{{MESSAGES:END:6}} +</chat_history> +``` + - Description: Sets the prompt template for tags generation. +- Persistence: This environment variable is a `PersistentConfig` variable. ### API Key Endpoint Restrictions @@ -407,11 +517,13 @@ When enabling `ENABLE_AUTOCOMPLETE_GENERATION`, ensure that you also configure ` - Type: `bool` - Default: `False` - Description: Enables API key endpoint restrictions for added security and configurability. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `API_KEY_ALLOWED_ENDPOINTS` - Type: `str` - Description: Specifies a comma-separated list of allowed API endpoints when API key endpoint restrictions are enabled. +- Persistence: This environment variable is a `PersistentConfig` variable. :::note @@ -444,6 +556,7 @@ Forgery attacks against local network resources. - Type: `bool` - Default: `True` - Description: Bypass SSL Verification for RAG on Websites. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `WEBUI_SESSION_COOKIE_SAME_SITE` @@ -526,13 +639,13 @@ modeling files for reranking. #### `RAG_EMBEDDING_MODEL_AUTO_UPDATE` - Type: `bool` -- Default: `False` +- Default: `True` - Description: Toggles automatic update of the Sentence-Transformer model. #### `RAG_RERANKING_MODEL_AUTO_UPDATE` - Type: `bool` -- Default: `False` +- Default: `True` - Description: Toggles automatic update of the reranking model. #### `WHISPER_MODEL_AUTO_UPDATE` @@ -557,12 +670,14 @@ modeling files for reranking. - `ollama` - Uses the Ollama API for embeddings. - `openai` - Uses the OpenAI API for embeddings. - Description: Selects an embedding engine to use for RAG. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_EMBEDDING_MODEL` - Type: `str` - Default: `sentence-transformers/all-MiniLM-L6-v2` - Description: Sets a model for embeddings. Locally, a Sentence-Transformer model is used. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_RAG_HYBRID_SEARCH` @@ -570,6 +685,7 @@ modeling files for reranking. - Default: `False` - Description: Enables the use of ensemble search with `BM25` + `ChromaDB`, with reranking using `sentence_transformers` models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `CONTENT_EXTRACTION_ENGINE` @@ -578,91 +694,115 @@ modeling files for reranking. - Leave empty to use default - `tika` - Use a local Apache Tika server - Description: Sets the content extraction engine to use for document ingestion. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_TOP_K` - Type: `int` -- Default: `5` +- Default: `3` - Description: Sets the default number of results to consider when using RAG. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_RELEVANCE_THRESHOLD` - Type: `float` - Default: `0.0` - Description: Sets the relevance threshold to consider for documents when used with reranking. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_TEMPLATE` - Type: `str` -- Default: +- Default: The value of `DEFAULT_RAG_TEMPLATE` environment variable. + +Template: ``` -You are given a user query, some textual context and rules, all inside xml tags. You have to answer the query based on the context while respecting the rules. +### Task: +Respond to the user query using the provided context, incorporating inline citations in the format [source_id] **only when the <source_id> tag is explicitly provided** in the context. + +### Guidelines: +- If you don't know the answer, clearly state that. +- If uncertain, ask the user for clarification. +- Respond in the same language as the user's query. +- If the context is unreadable or of poor quality, inform the user and provide the best possible answer. +- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding. +- **Only include inline citations using [source_id] when a <source_id> tag is explicitly provided in the context.** +- Do not cite if the <source_id> tag is not provided in the context. +- Do not use XML tags in your response. +- Ensure citations are concise and directly related to the information provided. + +### Example of Citation: +If the user asks about a specific topic and the information is found in "whitepaper.pdf" with a provided <source_id>, the response should include the citation like so: +* "According to the study, the proposed method increases efficiency by 20% [whitepaper.pdf]." +If no <source_id> is present, the response should omit the citation. + +### Output: +Provide a clear and direct response to the user's query, including inline citations in the format [source_id] only when the <source_id> tag is present in the context. <context> -[context] +{{CONTEXT}} </context> -<rules> -- If you don't know, just say so. -- If you are not sure, ask for clarification. -- Answer in the same language as the user query. -- If the context appears unreadable or of poor quality, tell the user then answer as best as you can. -- If the answer is not in the context but you think you know the answer, explain that to the user then answer with your own knowledge. -- Answer directly and without using xml tags. -</rules> - <user_query> -[query] +{{QUERY}} </user_query> ``` - Description: Template to use when injecting RAG documents into chat completion +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_TEXT_SPLITTER` - Type: `str` - Description: Sets the text splitter for RAG models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `TIKTOKEN_CACHE_DIR` - Type: `str` +- Default: `{CACHE_DIR}/tiktoken` - Description: Sets the directory for TikiToken cache. #### `TIKTOKEN_ENCODING_NAME` - Type: `str` +- Default: `cl100k_base` - Description: Sets the encoding name for TikiToken. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `CHUNK_SIZE` - Type: `int` -- Default: `1500` +- Default: `1000` - Description: Sets the document chunk size for embeddings. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `CHUNK_OVERLAP` - Type: `int` - Default: `100` - Description: Specifies how much overlap there should be between chunks. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `PDF_EXTRACT_IMAGES` - Type: `bool` - Default: `False` - Description: Extracts images from PDFs using OCR when loading documents. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_FILE_MAX_SIZE` - Type: `int` -- Default: `100` (100MB) - Description: Sets the maximum size of a file that can be uploaded for document ingestion. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_FILE_MAX_COUNT` - Type: `int` -- Default: `10` - Description: Sets the maximum number of files that can be uploaded at once for document ingestion. +- Persistence: This environment variable is a `PersistentConfig` variable. :::info @@ -674,18 +814,21 @@ When configuring `RAG_FILE_MAX_SIZE` and `RAG_FILE_MAX_COUNT`, ensure that the v - Type: `str` - Description: Sets a model for reranking results. Locally, a Sentence-Transformer model is used. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_OPENAI_API_BASE_URL` - Type: `str` - Default: `${OPENAI_API_BASE_URL}` - Description: Sets the OpenAI base API URL to use for RAG embeddings. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_OPENAI_API_KEY` - Type: `str` - Default: `${OPENAI_API_KEY}` - Description: Sets the OpenAI API key to use for RAG embeddings. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_EMBEDDING_OPENAI_BATCH_SIZE` @@ -696,28 +839,63 @@ When configuring `RAG_FILE_MAX_SIZE` and `RAG_FILE_MAX_COUNT`, ensure that the v #### `RAG_EMBEDDING_BATCH_SIZE` - Type: `int` +- Default: `1` - Description: Sets the batch size for embedding in RAG (Retrieval-Augmented Generator) models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_OLLAMA_API_KEY` - Type: `str` - Description: Sets the API key for Ollama API used in RAG models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_OLLAMA_BASE_URL` - Type: `str` - Description: Sets the base URL for Ollama API used in RAG models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_RETRIEVAL_QUERY_GENERATION` - Type: `bool` - Default: `True` - Description: Enables or disables retrieval query generation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `QUERY_GENERATION_PROMPT_TEMPLATE` - Type: `str` +- Default: The value of `DEFAULT_QUERY_GENERATION_PROMPT_TEMPLATE` environment variable. + +Template: + +``` +### Task: +Analyze the chat history to determine the necessity of generating search queries, in the given language. By default, **prioritize generating 1-3 broad and relevant search queries** unless it is absolutely certain that no additional information is required. The aim is to retrieve comprehensive, updated, and valuable information even with minimal uncertainty. If no search is unequivocally needed, return an empty list. + +### Guidelines: +- Respond **EXCLUSIVELY** with a JSON object. Any form of extra commentary, explanation, or additional text is strictly prohibited. +- When generating search queries, respond in the format: { "queries": ["query1", "query2"] }, ensuring each query is distinct, concise, and relevant to the topic. +- If and only if it is entirely certain that no useful results can be retrieved by a search, return: { "queries": [] }. +- Err on the side of suggesting search queries if there is **any chance** they might provide useful or updated information. +- Be concise and focused on composing high-quality search queries, avoiding unnecessary elaboration, commentary, or assumptions. +- Today's date is: {{CURRENT_DATE}}. +- Always prioritize providing actionable and broad queries that maximize informational coverage. + +### Output: +Strictly return in JSON format: +{ + "queries": ["query1", "query2"] +} + +### Chat History: +<chat_history> +{{MESSAGES:END:6}} +</chat_history> +``` + - Description: Sets the prompt template for query generation. +- Persistence: This environment variable is a `PersistentConfig` variable. ### Apache Tika @@ -726,19 +904,20 @@ When configuring `RAG_FILE_MAX_SIZE` and `RAG_FILE_MAX_COUNT`, ensure that the v - Type: `str` - Default: `http://localhost:9998` - Description: Sets the URL for the Apache Tika server. +- Persistence: This environment variable is a `PersistentConfig` variable. ### ChromaDB #### `CHROMA_TENANT` - Type: `str` -- Default: `default_tenant` +- Default: the value of `chromadb.DEFAULT_TENANT` (a constant in the `chromadb` module) - Description: Sets the tenant for ChromaDB to use for RAG embeddings. #### `CHROMA_DATABASE` - Type: `str` -- Default: `default_database` +- Default: the value of `chromadb.DEFAULT_DATABASE` (a constant in the `chromadb` module) - Description: Sets the database in the ChromaDB tenant to use for RAG embeddings. #### `CHROMA_HTTP_HOST` @@ -783,6 +962,7 @@ When configuring `RAG_FILE_MAX_SIZE` and `RAG_FILE_MAX_COUNT`, ensure that the v - Type: `bool` - Default: `False` - Description: Enables or disables Google Drive integration. If set to true, and `GOOGLE_DRIVE_CLIENT_ID` & `GOOGLE_DRIVE_API_KEY` are both configured, Google Drive will appear as an upload option in the chat UI. +- Persistence: This environment variable is a `PersistentConfig` variable. :::info @@ -794,11 +974,13 @@ When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGL - Type: `str` - Description: Sets the client ID for Google Drive (client must be configured with Drive API and Picker API enabled). +- Persistence: This environment variable is a `PersistentConfig` variable. #### `GOOGLE_DRIVE_API_KEY` - Type: `str` - Description: Sets the API key for Google Drive integration. +- Persistence: This environment variable is a `PersistentConfig` variable. ### Milvus @@ -824,12 +1006,13 @@ When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGL #### `OPENSEARCH_SSL` - Type: `bool` -- Default: `False` +- Default: `True` - Description: Enables or disables SSL for OpenSearch. #### `OPENSEARCH_URI` - Type: `str` +- Default: `https://localhost:9200` - Description: Sets the URI for OpenSearch. #### `OPENSEARCH_USERNAME` @@ -842,6 +1025,7 @@ When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGL #### `PGVECTOR_DB_URL` - Type: `str` +- Default: The value of `DATABASE_URL` environment variable - Description: Sets the database URL for model storage. ### Qdrant @@ -863,24 +1047,28 @@ When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGL - Type: `bool` - Default: `False` - Description: Enable web search toggle +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_SEARCH_QUERY_GENERATION` - Type: `bool` - Default: `True` - Description: Enables or disables search query generation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_WEB_SEARCH_RESULT_COUNT` - Type: `int` - Default: `3` - Description: Maximum number of search results to crawl. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_WEB_SEARCH_CONCURRENT_REQUESTS` - Type: `int` - Default: `10` - Description: Number of concurrent requests to crawl web pages returned from search results. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `RAG_WEB_SEARCH_ENGINE` @@ -899,88 +1087,106 @@ When enabling `GOOGLE_DRIVE_INTEGRATION`, ensure that you have configured `GOOGL - `tavily` - Uses the [Tavily](https://tavily.com/) search engine. - `jina` - Uses the [Jina](https://jina.ai/) search engine. - `bing` - Uses the [Bing](https://www.bing.com/) search engine. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SEARXNG_QUERY_URL` - Type: `str` - Description: The [SearXNG search API](https://docs.searxng.org/dev/search_api.html) URL supporting JSON output. `<query>` is replaced with the search query. Example: `http://searxng.local/search?q=<query>` +- Persistence: This environment variable is a `PersistentConfig` variable. #### `GOOGLE_PSE_API_KEY` - Type: `str` - Description: Sets the API key for the Google Programmable Search Engine (PSE) service. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `GOOGLE_PSE_ENGINE_ID` - Type: `str` - Description: The engine ID for the Google Programmable Search Engine (PSE) service. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `BRAVE_SEARCH_API_KEY` - Type: `str` - Description: Sets the API key for the Brave Search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `KAGI_SEARCH_API_KEY` - Type: `str` - Description: Sets the API key for Kagi Search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `MOJEEK_SEARCH_API_KEY` - Type: `str` - Description: Sets the API key for Mojeek Search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SERPSTACK_API_KEY` - Type: `str` - Description: Sets the API key for Serpstack search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SERPSTACK_HTTPS` - Type: `bool` - Default: `True` - Description: Configures the use of HTTPS for Serpstack requests. Free tier requests are restricted to HTTP only. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SERPER_API_KEY` - Type: `str` - Description: Sets the API key for Serper search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SERPLY_API_KEY` - Type: `str` - Description: Sets the API key for Serply search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SEARCHAPI_API_KEY` - Type: `str` - Description: Sets the API key for SearchAPI. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `SEARCHAPI_ENGINE` - Type: `str` - Description: Sets the SearchAPI engine. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `TAVILY_API_KEY` - Type: `str` - Description: Sets the API key for Tavily search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `JINA_API_KEY` - Type: `str` - Description: Sets the API key for Jina. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `BING_SEARCH_V7_ENDPOINT` - Type: `str` - Description: Sets the endpoint for Bing Search API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `BING_SEARCH_V7_SUBSCRIPTION_KEY` - Type: `str` +- Default: `https://api.bing.microsoft.com/v7.0/search` - Description: Sets the subscription key for Bing Search API. +- Persistence: This environment variable is a `PersistentConfig` variable. ### YouTube Loader @@ -988,12 +1194,14 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Sets the proxy URL for YouTube loader. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `YOUTUBE_LOADER_LANGUAGE` - Type: `str` - Default: `en` - Description: Sets the language to use for YouTube video loading. +- Persistence: This environment variable is a `PersistentConfig` variable. ## Audio @@ -1004,6 +1212,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Default: `base` - Description: Sets the Whisper model to use for Speech-to-Text. The backend used is faster_whisper with quantization to `int8`. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `WHISPER_MODEL_DIR` @@ -1020,24 +1229,28 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Leave empty to use local Whisper engine for Speech-to-Text. - `openai` - Uses OpenAI engine for Speech-to-Text. - Description: Specifies the Speech-to-Text engine to use. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_STT_MODEL` - Type: `str` - Default: `whisper-1` - Description: Specifies the Speech-to-Text model to use for OpenAI-compatible endpoints. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_STT_OPENAI_API_BASE_URL` - Type: `str` - Default: `${OPENAI_API_BASE_URL}` - Description: Sets the OpenAI-compatible base URL to use for Speech-to-Text. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_STT_OPENAI_API_KEY` - Type: `str` - Default: `${OPENAI_API_KEY}` - Description: Sets the OpenAI API key to use for Speech-to-Text. +- Persistence: This environment variable is a `PersistentConfig` variable. ### Text-to-Speech @@ -1045,6 +1258,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Sets the API key for Text-to-Speech. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_TTS_ENGINE` @@ -1054,12 +1268,14 @@ the search query. Example: `http://searxng.local/search?q=<query>` - `elevenlabs` - Uses ElevenLabs engine for Text-to-Speech - `openai` - Uses OpenAI engine for Text-to-Speech. - Description: Specifies the Text-to-Speech engine to use. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_TTS_MODEL` - Type: `str` - Default: `tts-1` - Description: Specifies the OpenAI text-to-speech model to use. +- Persistence: This environment variable is a `PersistentConfig` variable. ### Azure Text-to-Speech @@ -1067,11 +1283,13 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Sets the output format for Azure Text to Speech. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_TTS_AZURE_SPEECH_REGION` - Type: `str` - Description: Sets the region for Azure Text to Speech. +- Persistence: This environment variable is a `PersistentConfig` variable. ### OpenAI Text-to-Speech @@ -1080,24 +1298,28 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Default: `${OPENAI_API_BASE_URL}` - Description: Sets the OpenAI-compatible base URL to use for text-to-speech. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_TTS_OPENAI_API_KEY` - Type: `str` - Default: `${OPENAI_API_KEY}` - Description: Sets the API key to use for text-to-speech. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_TTS_SPLIT_ON` - Type: `str` - Default: `punctuation` - Description: Sets the OpenAI text-to-speech split on to use. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUDIO_TTS_VOICE` - Type: `str` - Default: `alloy` - Description: Sets the OpenAI text-to-speech voice to use. +- Persistence: This environment variable is a `PersistentConfig` variable. ## Image Generation @@ -1106,6 +1328,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `bool` - Default: `False` - Description: Enables or disables image generation features. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `IMAGE_GENERATION_ENGINE` @@ -1114,25 +1337,29 @@ the search query. Example: `http://searxng.local/search?q=<query>` - `openai` - Uses OpenAI DALL-E for image generation. - `comfyui` - Uses ComfyUI engine for image generation. - `automatic1111` - Uses Automatic1111 engine for image generation (default). -- Default: `automatic1111` +- Default: `openai` - Description: Specifies the engine to use for image generation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `IMAGE_GENERATION_MODEL` - Type: `str` - Description: Default model to use for image generation +- Persistence: This environment variable is a `PersistentConfig` variable. #### `IMAGE_SIZE` - Type: `str` - Default: `512x512` - Description: Sets the default image size to generate. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `IMAGE_STEPS` - Type: `int` - Default: `50` - Description: Sets the default iteration steps for image generation. Used for ComfyUI and AUTOMATIC1111. +- Persistence: This environment variable is a `PersistentConfig` variable. ### AUTOMATIC1111 @@ -1140,26 +1367,31 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Sets the Automatic1111 API authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUTOMATIC1111_BASE_URL` - Type: `str` - Description: Specifies the URL to Automatic1111's Stable Diffusion API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUTOMATIC1111_CFG_SCALE` - Type: `float` - Description: Sets the scale for Automatic1111 inference. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUTOMATIC1111_SAMPLER` - Type: `str` - Description: Sets the sampler for Automatic1111 inference. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `AUTOMATIC1111_SCHEDULER` - Type: `str` - Description: Sets the scheduler for Automatic1111 inference. +- Persistence: This environment variable is a `PersistentConfig` variable. ### ComfyUI @@ -1167,16 +1399,131 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Description: Specifies the URL to the ComfyUI image generation API. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `COMFYUI_API_KEY` - Type: `str` - Description: Sets the API key for ComfyUI. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `COMFYUI_WORKFLOW` - Type: `str` +- Default: + +``` +{ + "3": { + "inputs": { + "seed": 0, + "steps": 20, + "cfg": 8, + "sampler_name": "euler", + "scheduler": "normal", + "denoise": 1, + "model": [ + "4", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "5", + 0 + ] + }, + "class_type": "KSampler", + "_meta": { + "title": "KSampler" + } + }, + "4": { + "inputs": { + "ckpt_name": "model.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "5": { + "inputs": { + "width": 512, + "height": 512, + "batch_size": 1 + }, + "class_type": "EmptyLatentImage", + "_meta": { + "title": "Empty Latent Image" + } + }, + "6": { + "inputs": { + "text": "Prompt", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "7": { + "inputs": { + "text": "", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "4", + 2 + ] + }, + "class_type": "VAEDecode", + "_meta": { + "title": "VAE Decode" + } + }, + "9": { + "inputs": { + "filename_prefix": "ComfyUI", + "images": [ + "8", + 0 + ] + }, + "class_type": "SaveImage", + "_meta": { + "title": "Save Image" + } + } +} +``` + - Description: Sets the ComfyUI workflow. +- Persistence: This environment variable is a `PersistentConfig` variable. ### OpenAI DALL-E @@ -1185,12 +1532,14 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `str` - Default: `${OPENAI_API_BASE_URL}` - Description: Sets the OpenAI-compatible base URL to use for DALL-E image generation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `IMAGES_OPENAI_API_KEY` - Type: `str` - Default: `${OPENAI_API_KEY}` - Description: Sets the API key to use for DALL-E image generation. +- Persistence: This environment variable is a `PersistentConfig` variable. ## OAuth @@ -1199,6 +1548,7 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Type: `bool` - Default: `False` - Description: Enables account creation when sighting up via OAuth. Distinct from `ENABLE_SIGNUP`. +- Persistence: This environment variable is a `PersistentConfig` variable. :::danger @@ -1209,20 +1559,23 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `ENABLE_API_KEY` - Type: `bool` -- Default: `False` +- Default: `True` - Description: Enables API key authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_OAUTH_ROLE_MANAGEMENT` - Type: `bool` - Default: `False` - Description: Enables role management to oauth delegation. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `ENABLE_OAUTH_GROUP_MANAGEMENT` - Type: `bool` - Default: `False` - Description: Enables or disables OAUTH group management. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_MERGE_ACCOUNTS_BY_EMAIL` @@ -1231,58 +1584,70 @@ the search query. Example: `http://searxng.local/search?q=<query>` - Description: If enabled, merges OAuth accounts with existing accounts using the same email address. This is considered unsafe as not all OAuth providers will verify email addresses and can lead to potential account takeovers. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_USERNAME_CLAIM` - Type: `str` - Default: `name` - Description: Set username claim for OpenID. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_EMAIL_CLAIM` - Type: `str` - Default: `email` - Description: Set email claim for OpenID. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_PICTURE_CLAIM` - Type: `str` - Default: `picture` - Description: Set picture (avatar) claim for OpenID. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_GROUP_CLAIM` - Type: `str` +- Default: `groups` - Description: Specifies the group claim for OAUTH authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_ROLES_CLAIM` - Type: `str` - Default: `roles` - Description: Sets the roles claim to look for in the OIDC token. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_SCOPES` - Type: `str` - Default: `openid email profile` - Description: Sets the scope for OIDC authentication. `openid` and `email` are required. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_ALLOWED_DOMAINS` - Type: `str` +- Default: `*` - Description: Specifies the allowed domains for OAUTH authentication. (e.g. "example1.com,example2.com"). +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_ALLOWED_ROLES` - Type: `str` - Default: `user,admin` - Description: Sets the roles that are allowed access to the platform. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_ADMIN_ROLES` - Type: `str` - Default: `admin` - Description: Sets the roles that are considered administrators. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `WEBUI_AUTH_TRUSTED_EMAIL_HEADER` @@ -1303,23 +1668,27 @@ See https://support.google.com/cloud/answer/6158849?hl=en - Type: `str` - Description: Sets the client ID for Google OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. #### `GOOGLE_CLIENT_SECRET` - Type: `str` - Description: Sets the client secret for Google OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. #### `GOOGLE_OAUTH_SCOPE` - Type: `str` - Default: `openid email profile` - Description: Sets the scope for Google OAuth authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `GOOGLE_REDIRECT_URI` - Type: `str` - Default: `<backend>/oauth/google/callback` - Description: Sets the redirect URI for Google OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. ### Microsoft @@ -1329,28 +1698,33 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Type: `str` - Description: Sets the client ID for Microsoft OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. #### `MICROSOFT_CLIENT_SECRET` - Type: `str` - Description: Sets the client secret for Microsoft OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. #### `MICROSOFT_CLIENT_TENANT_ID` - Type: `str` - Description: Sets the tenant ID for Microsoft OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. #### `MICROSOFT_OAUTH_SCOPE` - Type: `str` - Default: `openid email profile` - Description: Sets the scope for Microsoft OAuth authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `MICROSOFT_REDIRECT_URI` - Type: `str` - Default: `<backend>/oauth/microsoft/callback` - Description: Sets the redirect URI for Microsoft OAuth +- Persistence: This environment variable is a `PersistentConfig` variable. ### OpenID (OIDC) @@ -1358,28 +1732,33 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Type: `str` - Description: Sets the client ID for OIDC +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_CLIENT_SECRET` - Type: `str` - Description: Sets the client secret for OIDC +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OPENID_PROVIDER_URL` - Type: `str` - Description: Path to the `.well-known/openid-configuration` endpoint +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OAUTH_PROVIDER_NAME` - Type: `str` - Default: `SSO` - Description: Sets the name for the OIDC provider. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OPENID_REDIRECT_URI` - Type: `str` - Default: `<backend>/oauth/oidc/callback` - Description: Sets the redirect URI for OIDC +- Persistence: This environment variable is a `PersistentConfig` variable. ## LDAP @@ -1388,88 +1767,107 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Type: `bool` - Default: `False` - Description: Enables or disables LDAP authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_APP_DN` - Type: `str` - Description: Sets the distinguished name for LDAP application. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_APP_PASSWORD` - Type: `str` - Description: Sets the password for LDAP application. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_ATTRIBUTE_FOR_USERNAME` - Type: `str` - Description: Sets the attribute to use as username for LDAP authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_CA_CERT_FILE` - Type: `str` - Description: Sets the path to LDAP CA certificate file. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_CIPHERS` - Type: `str` +- Default: `ALL` - Description: Sets the ciphers to use for LDAP connection. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_SEARCH_BASE` - Type: `str` - Description: Sets the base to search for LDAP authentication. +- Persistence: This environment variable is a `PersistentConfig` variable. -#### `LDAP_SEARCH_FILTER` +#### `LDAP_SEARCH_FILTERS` - Type: `str` - Description: Sets the filter to use for LDAP search. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_SERVER_HOST` - Type: `str` +- Default: `localhost` - Description: Sets the hostname of LDAP server. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_SERVER_LABEL` - Type: `str` - Description: Sets the label of LDAP server. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_SERVER_PORT` - Type: `int` +- Default: `389` - Description: Sets the port number of LDAP server. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `LDAP_USE_TLS` - Type: `bool` -- Default: `False` +- Default: `True` - Description: Enables or disables TLS for LDAP connection. +- Persistence: This environment variable is a `PersistentConfig` variable. ## Workspace Permissions #### `USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS` - Type: `bool` -- Default: `True` +- Default: `False` - Description: Enables or disables user permission to access workspace models. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS` - Type: `bool` -- Default: `True` +- Default: `False` - Description: Enables or disables user permission to access workspace knowledge. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS` - Type: `bool` -- Default: `True` +- Default: `False` - Description: Enables or disables user permission to access workspace prompts. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS` - Type: `bool` -- Default: `True` +- Default: `False` - Description: Enables or disables user permission to access workspace tools. +- Persistence: This environment variable is a `PersistentConfig` variable. ## Chat Permissions @@ -1478,24 +1876,28 @@ See https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-registe - Type: `bool` - Default: `True` - Description: Enables or disables user permission to upload files to chats. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USER_PERMISSIONS_CHAT_DELETE` - Type: `bool` - Default: `True` - Description: Enables or disables user permission to delete chats. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USER_PERMISSIONS_CHAT_EDIT` - Type: `bool` - Default: `True` - Description: Enables or disables user permission to edit chats. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `USER_PERMISSIONS_CHAT_TEMPORARY` - Type: `bool` - Default: `True` - Description: Enables or disables user permission to create temporary chats. +- Persistence: This environment variable is a `PersistentConfig` variable. ## Misc Environment Variables @@ -1506,6 +1908,7 @@ These variables are not specific to Open WebUI but can still be valuable in cert #### `STORAGE_PROVIDER` - Type: `str` +- Default: empty string (' '), which defaults to `local` - Description: Sets the storage provider. #### `S3_ACCESS_KEY_ID` From f552f5f76571f4dab1cf23ec3443b4030b4208aa Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Fri, 27 Dec 2024 15:13:48 -0500 Subject: [PATCH 11/13] Update env-configuration.md --- .../advanced-topics/env-configuration.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index 683d318..eaa0173 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -17,6 +17,21 @@ This page is up to date with Open WebUI release version [v0.5.1](https://github. ::: +### Important Note on PersistentConfig Environment Variables + + +:::note +When launching Open WebUI for the first time, all environment variables are treated equally and can be used to configure the application. However, for environment variables marked as `PersistentConfig`, their values are persisted and stored internally. + +After the initial launch, if you restart the container, `PersistentConfig` environment variables will no longer use the external environment variable values. Instead, they will use the internally stored values. + +In contrast, regular environment variables will continue to be updated and applied on each subsequent restart. + +You can update the values of `PersistentConfig` environment variables directly from within Open WebUI, and these changes will be stored internally. This allows you to manage these configuration settings independently of the external environment variables. + +Please note that `PersistentConfig` environment variables are clearly marked as such in the documentation below, so you can be aware of how they will behave. +::: + ## App/Backend The following environment variables are used by `backend/config.py` to provide Open WebUI startup From ebbf6850c2752779dd4bbbdcb873be172cd3732b Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Fri, 27 Dec 2024 17:52:07 -0500 Subject: [PATCH 12/13] Update env-configuration.md --- .../getting-started/advanced-topics/env-configuration.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index eaa0173..f868fa9 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -19,8 +19,8 @@ This page is up to date with Open WebUI release version [v0.5.1](https://github. ### Important Note on PersistentConfig Environment Variables - :::note + When launching Open WebUI for the first time, all environment variables are treated equally and can be used to configure the application. However, for environment variables marked as `PersistentConfig`, their values are persisted and stored internally. After the initial launch, if you restart the container, `PersistentConfig` environment variables will no longer use the external environment variable values. Instead, they will use the internally stored values. @@ -30,6 +30,7 @@ In contrast, regular environment variables will continue to be updated and appli You can update the values of `PersistentConfig` environment variables directly from within Open WebUI, and these changes will be stored internally. This allows you to manage these configuration settings independently of the external environment variables. Please note that `PersistentConfig` environment variables are clearly marked as such in the documentation below, so you can be aware of how they will behave. + ::: ## App/Backend @@ -169,7 +170,7 @@ is also being used and set to `True`. Failure to do so will result in the inabil #### `WEBHOOK_URL` - Type: `str` -- Description: Sets a webhook for integration with Slack/Microsoft Teams. +- Description: Sets a webhook for integration with Discord/Slack/Microsoft Teams. - Persistence: This environment variable is a `PersistentConfig` variable. #### `WEBUI_BUILD_HASH` @@ -285,6 +286,7 @@ allowing the client to wait indefinitely. - Type: `str` - Description: Configures load-balanced Ollama backend hosts, separated by `;`. See [`OLLAMA_BASE_URL`](#ollama_base_url). Takes precedence over[`OLLAMA_BASE_URL`](#ollama_base_url). +- Example: `http://host-one:11434;http://host-two:11434` - Persistence: This environment variable is a `PersistentConfig` variable. #### `USE_OLLAMA_DOCKER` @@ -313,6 +315,7 @@ allowing the client to wait indefinitely. - Type: `str` - Default: `https://api.openai.com/v1` - Description: Configures the OpenAI base API URL. +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OPENAI_API_BASE_URLS` @@ -325,6 +328,8 @@ allowing the client to wait indefinitely. - Type: `str` - Description: Sets the OpenAI API key. +- Example: `sk-124781258123` +- Persistence: This environment variable is a `PersistentConfig` variable. #### `OPENAI_API_KEYS` From e886656ae5dbda114e18578e1f6b30c98009afc5 Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Sat, 28 Dec 2024 00:36:36 -0500 Subject: [PATCH 13/13] Update env-configuration.md --- .../advanced-topics/env-configuration.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/advanced-topics/env-configuration.md b/docs/getting-started/advanced-topics/env-configuration.md index f868fa9..b97facd 100644 --- a/docs/getting-started/advanced-topics/env-configuration.md +++ b/docs/getting-started/advanced-topics/env-configuration.md @@ -679,8 +679,10 @@ modeling files for reranking. #### `VECTOR_DB` - Type: `str` +- Options: +- `chroma`, `milvus`, `qdrant`, `opensearch`, `pgvector` - Default: `chroma` -- Description: Specifies which vector database system to use, either 'chroma' for ChromaDB or 'milvus' for Milvus. This setting determines which vector storage system will be used for managing embeddings. +- Description: Specifies which vector database system to use. This setting determines which vector storage system will be used for managing embeddings. #### `RAG_EMBEDDING_ENGINE` @@ -775,6 +777,8 @@ Provide a clear and direct response to the user's query, including inline citati #### `RAG_TEXT_SPLITTER` - Type: `str` +- Options: `character`, `token` +- Default: `character` - Description: Sets the text splitter for RAG models. - Persistence: This environment variable is a `PersistentConfig` variable. @@ -1282,11 +1286,13 @@ the search query. Example: `http://searxng.local/search?q=<query>` #### `AUDIO_TTS_ENGINE` -- Type: `str` (enum: `elevenlabs`, `openai`) +- Type: `str` (enum: `azure`, `elevenlabs`, `openai`, `transformers`) - Options: - Leave empty to use built-in WebAPI engine for Text-to-Speech. + - `azure` - Uses Azure engine for Text-to-Speech. - `elevenlabs` - Uses ElevenLabs engine for Text-to-Speech - `openai` - Uses OpenAI engine for Text-to-Speech. + - `transformers` - Uses SentenceTransformers for Text-to-Speech. - Description: Specifies the Text-to-Speech engine to use. - Persistence: This environment variable is a `PersistentConfig` variable.