├── librechat ├── shutdown-local.sh ├── shutdown-production.sh ├── env │ ├── permission.env │ ├── db.debug.env │ ├── custom_endpoint.env │ ├── db.env │ ├── meilisearch.env │ ├── server.env │ ├── system.env │ └── endpoint.env ├── boot-local.sh ├── boot-production.sh ├── compose.local.yml ├── compose.prod.yml ├── compose.yml └── librechat.yaml ├── copilot-gpt4-service ├── shutdown-local.sh ├── shutdown-production.sh ├── compose.local.yml ├── boot-local.sh ├── boot-production.sh ├── gpt4.env ├── compose.prod.yml └── compose.yml ├── all-llm-keys.env ├── delete-llm-network.sh ├── create-llm-network.sh └── README.md /librechat/shutdown-local.sh: -------------------------------------------------------------------------------- 1 | docker compose -f compose.yml -f compose.local.yml down -------------------------------------------------------------------------------- /librechat/shutdown-production.sh: -------------------------------------------------------------------------------- 1 | docker compose -f compose.yml -f compose.prod.yml down -------------------------------------------------------------------------------- /copilot-gpt4-service/shutdown-local.sh: -------------------------------------------------------------------------------- 1 | docker compose -f compose.yml -f compose.local.yml down -------------------------------------------------------------------------------- /copilot-gpt4-service/shutdown-production.sh: -------------------------------------------------------------------------------- 1 | docker compose -f compose.yml -f compose.prod.yml down -------------------------------------------------------------------------------- /copilot-gpt4-service/compose.local.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | copilot-gpt4-service: 4 | ports: 5 | - "4000:4000" -------------------------------------------------------------------------------- /librechat/env/permission.env: -------------------------------------------------------------------------------- 1 | #=============# 2 | # Permissions # 3 | #=============# 4 | 5 | UID=1000 6 | GID=1000 -------------------------------------------------------------------------------- /librechat/boot-local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Create network if it does not exist. 4 | ../create-llm-network.sh 5 | 6 | docker compose -f compose.yml -f compose.local.yml up -d -------------------------------------------------------------------------------- /librechat/boot-production.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Create network if it does not exist. 4 | ../create-llm-network.sh 5 | 6 | docker compose -f compose.yml -f compose.prod.yml up -d -------------------------------------------------------------------------------- /copilot-gpt4-service/boot-local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Create network if it does not exist. 4 | ../create-llm-network.sh 5 | 6 | docker compose -f compose.yml -f compose.local.yml up -d -------------------------------------------------------------------------------- /copilot-gpt4-service/boot-production.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Create network if it does not exist. 4 | ../create-llm-network.sh 5 | 6 | docker compose -f compose.yml -f compose.prod.yml up -d -------------------------------------------------------------------------------- /copilot-gpt4-service/gpt4.env: -------------------------------------------------------------------------------- 1 | PORT=4000 2 | HOST=0.0.0.0 3 | LOG_LEVEL=info 4 | CACHE=true 5 | CACHE_PATH=db/cache.sqlite3 6 | RATE_LIMIT=1000 7 | ENABLE_SUPER_TOKEN=true 8 | SUPER_TOKEN=${COPILOT_GPT4_SERVICE_SUPER_TOKEN} -------------------------------------------------------------------------------- /copilot-gpt4-service/compose.prod.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | copilot-gpt4-service: 4 | networks: 5 | - default 6 | - llm 7 | 8 | networks: 9 | llm: 10 | name: llm-http-global-network 11 | external: true -------------------------------------------------------------------------------- /librechat/env/db.debug.env: -------------------------------------------------------------------------------- 1 | ME_CONFIG_MONGODB_SERVER=mongodb 2 | ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGODB_ROOT_USER} 3 | ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGODB_ROOT_PASSWORD} 4 | ME_CONFIG_BASICAUTH_USERNAME=UrUserNameForMongoExpress # TODO: Change this to something more secure 5 | ME_CONFIG_BASICAUTH_PASSWORD=UrPasswordForMongoExpress # TODO: Change this to something more secure 6 | -------------------------------------------------------------------------------- /librechat/env/custom_endpoint.env: -------------------------------------------------------------------------------- 1 | #============# 2 | # OpenRouter # 3 | #============# 4 | 5 | # Don't use this env, as it will override the `openAI` endpoint to use OpenRouter as well. 6 | # OPENROUTER_API_KEY= 7 | # OPEN_ROUTER_API_KEY= # covered by global llm env 8 | 9 | #============# 10 | # Mistral # 11 | #============# 12 | 13 | # MISTRAL_API_KEY= # covered by global llm env 14 | -------------------------------------------------------------------------------- /librechat/compose.local.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | librechat: 4 | ports: 5 | - "5000:5000" 6 | 7 | mongodb-express: 8 | image: mongo-express 9 | container_name: librechat-mongodb-express 10 | env_file: 11 | - env/db.env 12 | - env/db.debug.env 13 | ports: 14 | - "8081:8081" 15 | depends_on: 16 | - mongodb 17 | restart: unless-stopped -------------------------------------------------------------------------------- /librechat/env/db.env: -------------------------------------------------------------------------------- 1 | # either MONGODB_ROOT_PASSWORD= or ALLOW_EMPTY_PASSWORD=yes is needed 2 | MONGODB_ROOT_USER=root # default to root 3 | MONGODB_ROOT_PASSWORD=UrRootPassword # TODO: change this to a secure password 4 | MONGODB_USERNAME=UrUserName # TODO: change this to a secure username 5 | MONGODB_PASSWORD=UrPassword # TODO: change this to a secure password 6 | MONGODB_DATABASE=LibreChat 7 | -------------------------------------------------------------------------------- /librechat/env/meilisearch.env: -------------------------------------------------------------------------------- 1 | #==================================================# 2 | # Search # 3 | #==================================================# 4 | 5 | SEARCH=true 6 | MEILI_NO_ANALYTICS=true 7 | MEILI_HOST=http://meilisearch:7700 8 | MEILI_MASTER_KEY=YourOwnMasterKey # TODO: replace with your own, must be at least 16 bytes, composed of valid UTF-8 characters -------------------------------------------------------------------------------- /all-llm-keys.env: -------------------------------------------------------------------------------- 1 | # See https://docs.librechat.ai/install/configuration/ai_setup.html 2 | OPENAI_API_KEY= 3 | GEMINI_API_KEY= 4 | # for copilot-gpt4-service, see https://github.com/aaamoon/copilot-gpt4-service 5 | COPILOT_TOKEN= # used by copilot-gpt4-service 6 | COPILOT_GPT4_SERVICE_SUPER_TOKEN= # used by copilot-gpt4-service env var SUPER_TOKEN 7 | MISTRAL_API_KEY= 8 | OPEN_ROUTER_API_KEY= 9 | BINGAI_TOKEN= 10 | -------------------------------------------------------------------------------- /delete-llm-network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Define the network name 4 | NETWORK_NAME="llm-http-global-network" 5 | 6 | # Check if the network already exists 7 | if [ "$(docker network ls --filter name=^${NETWORK_NAME}$ --format="{{ .Name }}")" = "${NETWORK_NAME}" ]; then 8 | echo "Removing network '${NETWORK_NAME}." 9 | docker network rm ${NETWORK_NAME} 10 | else 11 | echo "Network did not exist." 12 | fi -------------------------------------------------------------------------------- /create-llm-network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Define the network name 4 | NETWORK_NAME="llm-http-global-network" 5 | 6 | # Check if the network already exists 7 | if [ "$(docker network ls --filter name=^${NETWORK_NAME}$ --format="{{ .Name }}")" = "${NETWORK_NAME}" ]; then 8 | echo "Network '${NETWORK_NAME}' already exists." 9 | else 10 | # Create the network if it doesn't exist 11 | docker network create -d bridge ${NETWORK_NAME} 12 | echo "Network '${NETWORK_NAME}' created." 13 | fi 14 | 15 | -------------------------------------------------------------------------------- /copilot-gpt4-service/compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | copilot-gpt4-service: 4 | image: aaamoon/copilot-gpt4-service 5 | container_name: copilot-gpt4-service 6 | env_file: 7 | - ../all-llm-keys.env # for some reason, this doesn't work in VPS 8 | - gpt4.env 9 | volumes: 10 | - 'db:/app/db' 11 | restart: unless-stopped 12 | command: ["-log_level", "info"] 13 | networks: 14 | - default 15 | - llm 16 | 17 | volumes: 18 | db: 19 | name: copilot-gpt4-service-db 20 | 21 | networks: 22 | default: 23 | name: copilot-gpt4-service-defnet 24 | llm: 25 | name: llm-http-global-network 26 | external: true -------------------------------------------------------------------------------- /librechat/env/server.env: -------------------------------------------------------------------------------- 1 | #==================================================# 2 | # Server Configuration # 3 | #==================================================# 4 | 5 | APP_TITLE="ur app title" 6 | CUSTOM_FOOTER="ur custom footer" 7 | 8 | HOST=0.0.0.0 9 | PORT=5000 10 | 11 | # see db.env for database configuration 12 | MONGO_URI=mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@mongodb:27017/${MONGODB_DATABASE} 13 | # MONGO_URI=mongodb://mongodb:27017/LibreChat 14 | 15 | # Looks like these two are only related to OAuth, see 16 | # DOMAIN_CLIENT=http://localhost:5000 17 | # DOMAIN_SERVER=http://localhost:5000 18 | 19 | NO_INDEX=true 20 | 21 | #===============# 22 | # Debug Logging # 23 | #===============# 24 | 25 | DEBUG_LOGGING=true 26 | DEBUG_CONSOLE=false 27 | 28 | -------------------------------------------------------------------------------- /librechat/compose.prod.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | librechat: 4 | environment: 5 | # disable registration for personal use, remove this if your instance is public 6 | - ALLOW_REGISTRATION=false 7 | networks: 8 | - default 9 | - nginx 10 | - llm 11 | 12 | # auto-update the container, doesn't necessarily need to be in this compose.yml file, as long as it's running on the same host 13 | # watchtower: 14 | # image: containrrr/watchtower 15 | # environment: 16 | # - WATCHTOWER_CLEANUP=true 17 | # - WATCHTOWER_POLL_INTERVAL=3600 18 | # volumes: 19 | # - /var/run/docker.sock:/var/run/docker.sock 20 | 21 | # this is yet another external docker bridge network to provide access from the nginx reverse proxy container 22 | # if your nginx (or caddy, or traefik, or whatever) is not a container then you don't need this 23 | networks: 24 | nginx: 25 | name: http-global-network 26 | external: true 27 | -------------------------------------------------------------------------------- /librechat/compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | librechat: 4 | image: ghcr.io/danny-avila/librechat-dev 5 | container_name: librechat-app 6 | env_file: 7 | # other pre-requisites 8 | - env/permission.env 9 | - env/db.env 10 | - ../all-llm-keys.env 11 | # librechat config 12 | - env/server.env 13 | - env/endpoint.env 14 | - env/custom_endpoint.env 15 | - env/meilisearch.env 16 | - env/system.env 17 | volumes: 18 | - image-gen:/app/client/public/images 19 | - ./librechat.yaml:/app/librechat.yaml 20 | restart: unless-stopped 21 | networks: 22 | - default 23 | - llm 24 | 25 | mongodb: 26 | image: bitnami/mongodb # an image with simplified user creation for custom databases 27 | container_name: librechat-mongodb 28 | env_file: 29 | - env/db.env 30 | volumes: 31 | - mongodb-data:/bitnami/mongodb/data 32 | restart: unless-stopped 33 | labels: 34 | - docker-volume-backup.stop-during-backup=librechat-mongodb-data 35 | 36 | meilisearch: 37 | image: getmeili/meilisearch 38 | container_name: librechat-meilisearch 39 | env_file: 40 | - env/permission.env 41 | - env/meilisearch.env 42 | volumes: 43 | - meilisearch-data:/meili_data 44 | restart: unless-stopped 45 | labels: 46 | - docker-volume-backup.stop-during-backup=librechat-meilisearch-data 47 | 48 | 49 | volumes: 50 | image-gen: 51 | name: librechat-image-gen 52 | mongodb-data: 53 | name: librechat-mongodb-data 54 | meilisearch-data: 55 | name: librechat-meilisearch-data 56 | 57 | networks: 58 | default: 59 | name: librechat-defnet 60 | llm: 61 | name: llm-http-global-network 62 | external: true 63 | -------------------------------------------------------------------------------- /librechat/librechat.yaml: -------------------------------------------------------------------------------- 1 | version: 1.0.1 2 | cache: true 3 | # see more config in https://docs.librechat.ai/install/configuration/ai_endpoints.html 4 | endpoints: 5 | custom: 6 | # Mistral AI API 7 | - name: "Mistral" 8 | apiKey: "${MISTRAL_API_KEY}" 9 | baseURL: "https://api.mistral.ai/v1" 10 | models: 11 | default: ["mistral-tiny", "mistral-small", "mistral-medium"] 12 | fetch: true 13 | titleConvo: true 14 | titleModel: "mistral-tiny" 15 | summarize: true 16 | summaryModel: "mistral-tiny" 17 | forcePrompt: false 18 | modelDisplayLabel: "Mistral" 19 | addParams: 20 | safe_prompt: true 21 | # NOTE: For Mistral, it is necessary to drop the following parameters or you will encounter a 422 Error: 22 | dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"] 23 | 24 | # OpenRouter.ai API 25 | - name: "OpenRouter" 26 | # Known issue: you should not use `OPENROUTER_API_KEY` as it will then override the `openAI` endpoint to use OpenRouter as well. 27 | apiKey: "${OPEN_ROUTER_API_KEY}" 28 | baseURL: "https://openrouter.ai/api/v1" 29 | models: 30 | default: ["openchat/openchat-7b:free"] 31 | fetch: true 32 | titleConvo: true 33 | titleModel: "openchat/openchat-7b:free" 34 | summarize: true 35 | summaryModel: "openchat/openchat-7b:free" 36 | forcePrompt: false 37 | modelDisplayLabel: "OpenRouter" 38 | dropParams: ["stop"] # OpenRouter has its own stop word for each LLM, so dropping ours from LibreChat, otherwise your LLM can not stop 39 | 40 | # Github Copilot in Local 41 | - name: "Github Copilot Chat" 42 | apiKey: ${COPILOT_GPT4_SERVICE_SUPER_TOKEN} 43 | baseURL: "http://copilot-gpt4-service:4000/v1" 44 | iconURL: "https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/githubcopilot.svg" 45 | models: 46 | default: ["gpt-4", "gpt-3.5-turbo"] 47 | fetch: true 48 | titleConvo: true 49 | titleModel: "gpt-3.5-turbo" 50 | summarize: true 51 | summaryModel: "gpt-3.5-turbo" 52 | forcePrompt: false 53 | modelDisplayLabel: "Github Copilot" 54 | dropParams: ["user"] 55 | 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LibreChat Docker Deployment 2 | 3 | Although [the official docker compose deployment guide](https://docs.librechat.ai/install/installation/docker_compose_install.html) from LibreChat documenetation is enough for everyone, I would like to share my own way of deploying LibreChat using Docker and Docker Compose 4 | 5 | ## Features 6 | 7 | - Using the official [prebuilt image](https://github.com/danny-avila?tab=packages&repo_name=LibreChat) to avoid running `docker build` command 8 | - Already provided configuration of OpenAI, Gemini, Mistral, OpenRouter, BingAI, DALLE. Just put yout API key in the `all-api-key.env` file and you are good to go 9 | - Enforced mongodb protection through the creation of separate database with a separate username and passwords. 10 | - Separate environment files for different sections of the configuration, allowing for better environment management. 11 | - An external Docker bridge network for configuring access to other self-hosted LLM providers (`copilot-gpt4-service` in this case). 12 | - Different profiles for local and production environments, with a common base `compose.yml`. 13 | 14 | ## Prerequisites 15 | 16 | Before you begin, ensure you have the following installed: 17 | 18 | - Docker 19 | - Docker Compose 20 | 21 | ## Setup 22 | 23 | Follow these steps to get your development environment set up: 24 | 25 | 1. Clone this repository or download the ZIP file. 26 | 2. Navigate to the project directory. 27 | 3. Fill in your API keys in the `all-api-key.env` file. 28 | 4. (Optional but highly recommended for the best practice of security) Complete all the `# TODO` in [`librechat/env`](librechat/env/) 29 | 30 | ## Usage 31 | 32 | ### Setting up the Network 33 | 34 | Note that the "llm-http-global-network" network will be used by both `librechat` and `copilot-gpt4-service`. The network is declared as an external bridge network in both `compose.yml` files, and created when you run any of the startup shell scripts, or this command below: 35 | 36 | ``` 37 | ./create-llm-network.sh 38 | ``` 39 | 40 | ### Local Environment 41 | 42 | For local debugging, use the `boot-local.sh` and `shutdown-local.sh` scripts. These scripts use the `compose.local.yml` file and expose the necessary ports for local debugging. 43 | 44 | To start the service: 45 | 46 | ``` 47 | ./boot-local.sh 48 | ``` 49 | 50 | To shutdown the service: 51 | 52 | ``` 53 | ./shutdown-local.sh 54 | ``` 55 | 56 | ### Production Environment 57 | 58 | In a production environment, use the `boot-production.sh` and `shutdown-production.sh` scripts. These scripts use the `compose.prod.yml` file. 59 | 60 | To start the service: 61 | 62 | ``` 63 | ./boot-production.sh 64 | ``` 65 | 66 | To shutdown the service: 67 | 68 | ``` 69 | ./shutdown-production.sh 70 | ``` 71 | -------------------------------------------------------------------------------- /librechat/env/system.env: -------------------------------------------------------------------------------- 1 | #===================================================# 2 | # User System # 3 | #===================================================# 4 | 5 | #========================# 6 | # Moderation # 7 | #========================# 8 | 9 | OPENAI_MODERATION=false 10 | OPENAI_MODERATION_API_KEY= 11 | # OPENAI_MODERATION_REVERSE_PROXY= 12 | 13 | BAN_VIOLATIONS=true 14 | BAN_DURATION=1000 * 60 * 60 * 2 15 | BAN_INTERVAL=20 16 | 17 | LOGIN_VIOLATION_SCORE=1 18 | REGISTRATION_VIOLATION_SCORE=1 19 | CONCURRENT_VIOLATION_SCORE=1 20 | MESSAGE_VIOLATION_SCORE=1 21 | NON_BROWSER_VIOLATION_SCORE=20 22 | 23 | LOGIN_MAX=7 24 | LOGIN_WINDOW=5 25 | REGISTER_MAX=5 26 | REGISTER_WINDOW=60 27 | 28 | LIMIT_CONCURRENT_MESSAGES=true 29 | CONCURRENT_MESSAGE_MAX=2 30 | 31 | LIMIT_MESSAGE_IP=true 32 | MESSAGE_IP_MAX=40 33 | MESSAGE_IP_WINDOW=1 34 | 35 | LIMIT_MESSAGE_USER=false 36 | MESSAGE_USER_MAX=40 37 | MESSAGE_USER_WINDOW=1 38 | 39 | #========================# 40 | # Balance # 41 | #========================# 42 | 43 | CHECK_BALANCE=false 44 | 45 | #========================# 46 | # Registration and Login # 47 | #========================# 48 | 49 | ALLOW_EMAIL_LOGIN=true 50 | ALLOW_REGISTRATION=true 51 | ALLOW_SOCIAL_LOGIN=false 52 | ALLOW_SOCIAL_REGISTRATION=false 53 | 54 | SESSION_EXPIRY=1000 * 60 * 15 55 | REFRESH_TOKEN_EXPIRY=(1000 * 60 * 60 * 24) * 7 56 | 57 | JWT_SECRET=752dda4071aa1801a46d2c8fbb1c4cc45b796b5302edb24cda50570a29b3b6b0 # TODO: please generate your own from https://replit.com/@daavila/crypto#index.js 58 | JWT_REFRESH_SECRET=752dda4071aa1801a46d2c8fbb1c4cc45b796b5302edb24cda50570a29b3b6b0 # TODO: please generate your own from https://replit.com/@daavila/crypto#index.js 59 | 60 | # Discord 61 | # DISCORD_CLIENT_ID= 62 | # DISCORD_CLIENT_SECRET= 63 | # DISCORD_CALLBACK_URL=/oauth/discord/callback 64 | 65 | # Facebook 66 | # FACEBOOK_CLIENT_ID= 67 | # FACEBOOK_CLIENT_SECRET= 68 | # FACEBOOK_CALLBACK_URL=/oauth/facebook/callback 69 | 70 | # GitHub 71 | # GITHUB_CLIENT_ID= 72 | # GITHUB_CLIENT_SECRET= 73 | # GITHUB_CALLBACK_URL=/oauth/github/callback 74 | 75 | # Google 76 | # GOOGLE_CLIENT_ID= 77 | # GOOGLE_CLIENT_SECRET= 78 | # GOOGLE_CALLBACK_URL=/oauth/google/callback 79 | 80 | # OpenID 81 | # OPENID_CLIENT_ID= 82 | # OPENID_CLIENT_SECRET= 83 | # OPENID_ISSUER= 84 | # OPENID_SESSION_SECRET= 85 | # OPENID_SCOPE="openid profile email" 86 | # OPENID_CALLBACK_URL=/oauth/openid/callback 87 | 88 | # OPENID_BUTTON_LABEL= 89 | # OPENID_IMAGE_URL= 90 | 91 | #========================# 92 | # Email Password Reset # 93 | #========================# 94 | 95 | # TODO: optional but highly recommended to set this up 96 | 97 | EMAIL_SERVICE= 98 | # EMAIL_HOST= 99 | # EMAIL_PORT= 100 | # EMAIL_ENCRYPTION=tls 101 | # EMAIL_ENCRYPTION_HOSTNAME= 102 | # EMAIL_ALLOW_SELFSIGNED= 103 | EMAIL_USERNAME= 104 | EMAIL_PASSWORD= 105 | EMAIL_FROM_NAME= 106 | EMAIL_FROM= 107 | 108 | #========================# 109 | # Firebase CDN # 110 | #========================# 111 | 112 | # FIREBASE_API_KEY= 113 | # FIREBASE_AUTH_DOMAIN= 114 | # FIREBASE_PROJECT_ID= 115 | # FIREBASE_STORAGE_BUCKET= 116 | # FIREBASE_MESSAGING_SENDER_ID= 117 | # FIREBASE_APP_ID= -------------------------------------------------------------------------------- /librechat/env/endpoint.env: -------------------------------------------------------------------------------- 1 | 2 | #===================================================# 3 | # Endpoints # 4 | #===================================================# 5 | 6 | # ENDPOINTS=openAI,azureOpenAI,bingAI,chatGPTBrowser,google,gptPlugins,anthropic 7 | 8 | PROXY= 9 | 10 | #============# 11 | # Anthropic # 12 | #============# 13 | 14 | # ANTHROPIC_API_KEY=user_provided 15 | # ANTHROPIC_MODELS=claude-1,claude-instant-1,claude-2 16 | # ANTHROPIC_REVERSE_PROXY= 17 | 18 | #============# 19 | # Azure # 20 | #============# 21 | 22 | # AZURE_API_KEY= 23 | # AZURE_OPENAI_MODELS=gpt-3.5-turbo,gpt-4 24 | # AZURE_OPENAI_DEFAULT_MODEL=gpt-3.5-turbo 25 | # PLUGINS_USE_AZURE="true" 26 | 27 | # AZURE_USE_MODEL_AS_DEPLOYMENT_NAME=TRUE 28 | 29 | # AZURE_OPENAI_API_INSTANCE_NAME= 30 | # AZURE_OPENAI_API_DEPLOYMENT_NAME= 31 | # AZURE_OPENAI_API_VERSION= 32 | # AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME= 33 | # AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME= 34 | 35 | #============# 36 | # BingAI # 37 | #============# 38 | 39 | # BINGAI_TOKEN= # covered by global llm env 40 | # BINGAI_HOST=https://cn.bing.com 41 | 42 | #============# 43 | # ChatGPT # 44 | #============# 45 | 46 | # CHATGPT_TOKEN= 47 | # CHATGPT_MODELS=text-davinci-002-render-sha 48 | # CHATGPT_REVERSE_PROXY= 49 | 50 | #============# 51 | # Google # 52 | #============# 53 | 54 | GOOGLE_KEY=${GEMINI_API_KEY} 55 | # GOOGLE_MODELS=gemini-pro,gemini-pro-vision,chat-bison,chat-bison-32k,codechat-bison,codechat-bison-32k,text-bison,text-bison-32k,text-unicorn,code-gecko,code-bison,code-bison-32k 56 | # GOOGLE_REVERSE_PROXY= 57 | 58 | #============# 59 | # OpenAI # 60 | #============# 61 | 62 | # OPENAI_API_KEY= # covered by global llm env 63 | # OPENAI_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-0301,gpt-3.5-turbo,gpt-4,gpt-4-0613,gpt-4-vision-preview,gpt-3.5-turbo-0613,gpt-3.5-turbo-16k-0613,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview,gpt-3.5-turbo-1106,gpt-3.5-turbo-instruct,gpt-3.5-turbo-instruct-0914,gpt-3.5-turbo-16k 64 | 65 | DEBUG_OPENAI=false 66 | 67 | TITLE_CONVO=true 68 | OPENAI_TITLE_MODEL=gpt-3.5-turbo 69 | 70 | OPENAI_SUMMARIZE=true 71 | OPENAI_SUMMARY_MODEL=gpt-3.5-turbo 72 | 73 | # OPENAI_FORCE_PROMPT=true 74 | 75 | # OPENAI_REVERSE_PROXY= 76 | 77 | # OPENAI_ORGANIZATION= 78 | 79 | 80 | #============# 81 | # Plugins # 82 | #============# 83 | 84 | # PLUGIN_MODELS=gpt-4,gpt-4-turbo-preview,gpt-4-0125-preview,gpt-4-1106-preview,gpt-4-0613,gpt-3.5-turbo,gpt-3.5-turbo-0125,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613 85 | 86 | DEBUG_PLUGINS=true 87 | 88 | CREDS_KEY=806845ae355c3820b04a674c5357da37d28c98dd51a39f8b22c4a81dcc17b2c7 # TODO: please generate your own from https://replit.com/@daavila/crypto#index.js 89 | CREDS_IV=92eaa62ca94959127094443fe56ea651 # TODO: please generate your own from https://replit.com/@daavila/crypto#index.js 90 | 91 | # Azure AI Search 92 | #----------------- 93 | # AZURE_AI_SEARCH_SERVICE_ENDPOINT= 94 | # AZURE_AI_SEARCH_INDEX_NAME= 95 | # AZURE_AI_SEARCH_API_KEY= 96 | 97 | # AZURE_AI_SEARCH_API_VERSION= 98 | # AZURE_AI_SEARCH_SEARCH_OPTION_QUERY_TYPE= 99 | # AZURE_AI_SEARCH_SEARCH_OPTION_TOP= 100 | # AZURE_AI_SEARCH_SEARCH_OPTION_SELECT= 101 | 102 | # DALL·E 103 | #---------------- 104 | DALLE_API_KEY=${OPENAI_API_KEY} # currently unused 105 | # workaround to set both DALLE3_API_KEY and DALLE2_API_KEY using $DALLE_API_KEY 106 | # see https://github.com/danny-avila/LibreChat/discussions/1755 107 | DALLE3_API_KEY=${DALLE_API_KEY} 108 | DALLE2_API_KEY=${DALLE_API_KEY} 109 | # DALLE3_SYSTEM_PROMPT= 110 | # DALLE2_SYSTEM_PROMPT= 111 | # DALLE_REVERSE_PROXY= 112 | # DALLE3_BASEURL= 113 | # DALLE2_BASEURL= 114 | 115 | # DALL·E (via Azure OpenAI) 116 | # Note: requires some of the variables above to be set 117 | #---------------- 118 | # DALLE3_AZURE_API_VERSION= 119 | # DALLE2_AZURE_API_VERSION= 120 | 121 | # Google 122 | #----------------- 123 | GOOGLE_API_KEY= # TODO: please use your own if you want to use Google search plugin 124 | GOOGLE_CSE_ID= # TODO: please use your own if you want to use Google search plugin 125 | 126 | # SerpAPI 127 | #----------------- 128 | # SERPAPI_API_KEY= 129 | 130 | # Stable Diffusion 131 | #----------------- 132 | # SD_WEBUI_URL=http://host.docker.internal:7860 133 | 134 | # WolframAlpha 135 | #----------------- 136 | # WOLFRAM_APP_ID= 137 | 138 | # Zapier 139 | #----------------- 140 | # ZAPIER_NLA_API_KEY= --------------------------------------------------------------------------------