mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-30 23:28:52 +01:00
* Squashed commit of the following:
commit 26ab03fb36fcc7fcee63fdf3ae8c2dfb29027eff
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:23:23 2023 -0500
Update Registration.spec.tsx
commit e908dd82fe9ef1b43c75ee64c183d2f654bdac1c
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:23:01 2023 -0500
Update Login.spec.tsx
commit 223734820fb77d7fb5af4802af642d1c1fd7c1f5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:22:39 2023 -0500
Update Registration.tsx
commit 7036d3dd0538979ee397d958ebc113bb0ea32411
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:21:55 2023 -0500
Update Login.tsx
commit 76bb78221db3195fd930fe9cfd6a5da7194fa759
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:21:03 2023 -0500
Update envConstants.js
commit ee2f69f33d75fbb57022afbcd9564bca38a46bee
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:20:08 2023 -0500
Update docker-compose.yml
commit 5ac72d789b3446884c6e2f4f595cbf67d731d43c
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:18:41 2023 -0500
Update Dockerfile
commit d24341db2bd5b17eb89ab01e171a5f51f3beab0a
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:16:38 2023 -0500
Update .env.example
commit 22154f4a09c5fcdfee95d43609fb01a5a883b7a9
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:07:48 2023 -0500
Update Registration.spec.tsx
commit 5163f7d372a6a03c94f4357b358211a03369456e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:07:30 2023 -0500
Update Login.spec.tsx
commit 61da49e330a9376e130b24dc944854f97ab58d80
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:07:00 2023 -0500
Update Registration.tsx
commit 0e45d3f0dbde34388ff2f0b2dc51b983b472eb05
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:06:18 2023 -0500
Update Login.tsx
commit dca1e5367e5f3b468c7964218cc5914ca53095af
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:05:07 2023 -0500
Update envConstants.js
commit f48c058465d82b03716ba85224e9f97007e014d2
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Tue Jun 13 00:04:05 2023 -0500
Update .env.example
commit 818226c9cb079acae4fcbfe5997e4aa9e3c6d2cc
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:59:08 2023 -0500
Update .env.example
commit 9a805439189b352a38ac7654d7a31bb28f0f58dd
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:58:31 2023 -0500
Update env.d.ts
commit 3f37ce54758b017c9281b7fad9b040a47630ec66
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:57:04 2023 -0500
Update .env.example
commit 1026036f4dd529e9531c53084450ce768cfca4c1
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:50:36 2023 -0500
Update docker-compose.yml
commit a61cf7b8c51d4a9bd73a20bd67abc29891c11463
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:50:00 2023 -0500
Update Dockerfile
commit 79610d6648755cd5ec45215b9fdbe04ba8242fcf
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:35:34 2023 -0500
Update package-lock.json
commit e40853fd2b77f2db5be1c3dfd8b170d650e23271
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:30:17 2023 -0500
Update envConstants.js
commit 5529bc61b43f279fb4418c3851be2f9011b6454d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:25:58 2023 -0500
Update docker-compose.yml
commit 07848cc464a64f7cad484e24a1310dc61aa03b18
Merge: ec628a3 72e9828
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:24:03 2023 -0500
Merge branch 'danny-avila:main' into openid-client
commit ec628a3044ba963b4e733c72229400074e7c2bc4
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:23:16 2023 -0500
Update envConstants.js
commit 21272221db0f58c244f08335482d45b177d338ab
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:21:59 2023 -0500
Update Registration.spec.tsx
commit d3f2949c0484d5760e7b689501852f86209992a3
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:21:12 2023 -0500
Update Login.spec.tsx
commit f2cf23ddd6708a3bb8d032dde5f1ce300dbe8cad
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:20:15 2023 -0500
Update Registration.tsx
commit 482c346b2a7baf958665c9474223d2557504dee5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:17:53 2023 -0500
Update Login.tsx
commit 2f017aa5bf4ef91b73fe027fb346132e1a5d8b87
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:14:17 2023 -0500
Update env.d.ts
commit addfd95cf93ef19cae05bab652d634af64313e6a
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:13:16 2023 -0500
Create openidStrategy.js
commit 84c3b5c2f078494d8380f3a02e3ba2d935d8d79f
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:09:02 2023 -0500
Update oauth.js
commit 63225cdf33b7f42005b4a446797acbd91b7ee4a7
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:07:35 2023 -0500
Update index.js
commit 6efe4dafd4359ed1c3139468bf9d43f70bbaf6aa
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:04:55 2023 -0500
Update package.json
commit 201badbbb5a5c8d48f5c4cba3a1349d4cfc7a070
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:03:37 2023 -0500
Update User.js
commit 7d13d5c303465be9b1268e5f6d9bdf7bb8dfb2e4
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:02:29 2023 -0500
Update Dockerfile
commit 2ef7f84ea77f281c3dce61211d9fd841a6424e65
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Mon Jun 12 23:00:42 2023 -0500
Update .env.example
* Update openidStrategy.js
* Update .env.example
* Update .env.example
* Update docker-compose.yml
* Update env.d.ts
* Update .env.example
* Update .env.example
* Update config.js
* Update Login.tsx
* Update config.js
* Update Login.tsx
* Update Registration.tsx
* Update docker-compose.yml
* Update openidStrategy.js
* Update docker-compose.yml
* Update config.spec.js
* Update Login.spec.tsx
* Update Registration.spec.tsx
* Update types.ts
* Update .env.example
* Update package-lock.json
* Update openidStrategy.js
* Update openidStrategy.js
* Update config.js
* Update config.js
* Update Login.tsx
* Update Registration.tsx
* Update oauth.js
* Update openidStrategy.js
* Update openidStrategy.js
* Update Registration.tsx
* Update Login.tsx
* Update Login.tsx
* Update Registration.tsx
* Update Registration.tsx
* Update index.js
* Update index.js
* Update .env.example
* Update user_auth_system.md
updated instruction that includes OpenID set up
* Update package.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update openidStrategy.js
* Update openidStrategy.js
Lookup user based on openID instead of email. This is because not all AzureAD users may have an email tied to their account
* Update openidStrategy.js
First try to match an email, then try openIdID
* Update openidStrategy.js
* Update openidStrategy.js
Consider a family name or given name is not provided
---------
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
220 lines
8.9 KiB
Text
220 lines
8.9 KiB
Text
##########################
|
|
# Server configuration:
|
|
##########################
|
|
|
|
APP_TITLE=LibreChat
|
|
|
|
# The server will listen to localhost:3080 by default. You can change the target IP as you want.
|
|
# If you want to make this server available externally, for example to share the server with others
|
|
# or expose this from a Docker container, set host to 0.0.0.0 or your external IP interface.
|
|
# Tips: Setting host to 0.0.0.0 means listening on all interfaces. It's not a real IP.
|
|
# Use localhost:port rather than 0.0.0.0:port to access the server.
|
|
# Set Node env to development if running in dev mode.
|
|
HOST=localhost
|
|
PORT=3080
|
|
|
|
# Change this to proxy any API request.
|
|
# It's useful if your machine has difficulty calling the original API server.
|
|
# PROXY=
|
|
|
|
# Change this to your MongoDB URI if different. I recommend appending LibreChat.
|
|
MONGO_URI=mongodb://127.0.0.1:27017/LibreChat
|
|
|
|
##########################
|
|
# OpenAI Endpoint:
|
|
##########################
|
|
|
|
# Access key from OpenAI platform.
|
|
# Leave it blank to disable this feature.
|
|
# Set to "user_provided" to allow the user to provide their API key from the UI.
|
|
OPENAI_API_KEY="user_provided"
|
|
|
|
# Identify the available models, separated by commas *without spaces*.
|
|
# The first will be default.
|
|
# Leave it blank to use internal settings.
|
|
OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-0301,text-davinci-003,gpt-4,gpt-4-0314,gpt-4-0613
|
|
|
|
# Reverse proxy settings for OpenAI:
|
|
# https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy
|
|
# OPENAI_REVERSE_PROXY=
|
|
|
|
##########################
|
|
# AZURE Endpoint:
|
|
##########################
|
|
|
|
# To use Azure with this project, set the following variables. These will be used to build the API URL.
|
|
# Chat completion:
|
|
# `https://{AZURE_OPENAI_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/{AZURE_OPENAI_API_DEPLOYMENT_NAME}/chat/completions?api-version={AZURE_OPENAI_API_VERSION}`;
|
|
# You should also consider changing the `OPENAI_MODELS` variable above to the models available in your instance/deployment.
|
|
# Note: I've noticed that the Azure API is much faster than the OpenAI API, so the streaming looks almost instantaneous.
|
|
# Note "AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME" and "AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME" are optional but might be used in the future
|
|
|
|
# AZURE_OPENAI_API_KEY=
|
|
# AZURE_OPENAI_API_INSTANCE_NAME=
|
|
# AZURE_OPENAI_API_DEPLOYMENT_NAME=
|
|
# AZURE_OPENAI_API_VERSION=
|
|
# AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME=
|
|
# AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME=
|
|
|
|
##########################
|
|
# BingAI Endpoint:
|
|
##########################
|
|
|
|
# Also used for Sydney and jailbreak
|
|
# To get your Access token for Bing, login to https://www.bing.com
|
|
# Use dev tools or an extension while logged into the site to copy the content of the _U cookie.
|
|
#If this fails, follow these instructions https://github.com/danny-avila/LibreChat/issues/370#issuecomment-1560382302 to provide the full cookie strings.
|
|
# Set to "user_provided" to allow the user to provide its token from the UI.
|
|
# Leave it blank to disable this endpoint.
|
|
BINGAI_TOKEN="user_provided"
|
|
|
|
# BingAI Host:
|
|
# Necessary for some people in different countries, e.g. China (https://cn.bing.com)
|
|
# Leave it blank to use default server.
|
|
# BINGAI_HOST=https://cn.bing.com
|
|
|
|
##########################
|
|
# ChatGPT Endpoint:
|
|
##########################
|
|
|
|
# ChatGPT Browser Client (free but use at your own risk)
|
|
# Access token from https://chat.openai.com/api/auth/session
|
|
# Exposes your access token to `CHATGPT_REVERSE_PROXY`
|
|
# Set to "user_provided" to allow the user to provide its token from the UI.
|
|
# Leave it blank to disable this endpoint
|
|
CHATGPT_TOKEN="user_provided"
|
|
|
|
# Identify the available models, separated by commas. The first will be default.
|
|
# Leave it blank to use internal settings.
|
|
CHATGPT_MODELS=text-davinci-002-render-sha,gpt-4
|
|
# NOTE: you can add gpt-4-plugins, gpt-4-code-interpreter, and gpt-4-browsing to the list above and use the models for these features;
|
|
# however, the view/display portion of these features are not supported, but you can use the underlying models, which have higher token context
|
|
# Also: text-davinci-002-render-paid is deprecated as of May 2023
|
|
|
|
# Reverse proxy setting for OpenAI
|
|
# https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy
|
|
# By default it will use the node-chatgpt-api recommended proxy, (it's a third party server)
|
|
# CHATGPT_REVERSE_PROXY=<YOUR REVERSE PROXY>
|
|
|
|
#############################
|
|
# Plugins:
|
|
#############################
|
|
|
|
# Identify the available models, separated by commas *without spaces*.
|
|
# The first will be default.
|
|
# Leave it blank to use internal settings.
|
|
PLUGIN_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-0301,gpt-4,gpt-4-0314,gpt-4-0613
|
|
|
|
# For securely storing credentials, you need a fixed key and IV. You can set them here for prod and dev environments
|
|
# If you don't set them, the app will crash on startup.
|
|
# You need a 32-byte key (64 characters in hex) and 16-byte IV (32 characters in hex)
|
|
# Use this replit to generate some quickly: https://replit.com/@daavila/crypto#index.js
|
|
# Here are some examples (THESE ARE NOT SECURE!)
|
|
CREDS_KEY=f34be427ebb29de8d88c107a71546019685ed8b241d8f2ed00c3df97ad2566f0
|
|
CREDS_IV=e2341419ec3dd3d19b13a1a87fafcbfb
|
|
|
|
|
|
# AI-Assisted Google Search
|
|
# This bot supports searching google for answers to your questions with assistance from GPT!
|
|
# See detailed instructions here: https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md
|
|
GOOGLE_API_KEY=
|
|
GOOGLE_CSE_ID=
|
|
|
|
# StableDiffusion WebUI
|
|
# This bot supports StableDiffusion WebUI, using it's API to generated requested images.
|
|
# See detailed instructions here: https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/stable_diffusion.md
|
|
# Use "http://127.0.0.1:7860" with local install and "http://host.docker.internal:7860" for docker
|
|
SD_WEBUI_URL=http://host.docker.internal:7860
|
|
|
|
##########################
|
|
# PaLM (Google) Endpoint:
|
|
##########################
|
|
|
|
# Follow the instruction here to setup:
|
|
# https://github.com/danny-avila/LibreChat/blob/main/docs/install/apis_and_tokens.md
|
|
|
|
PALM_KEY="user_provided"
|
|
|
|
# In case you need a reverse proxy for this endpoint:
|
|
# GOOGLE_REVERSE_PROXY=
|
|
|
|
##########################
|
|
# Proxy: To be Used by all endpoints
|
|
##########################
|
|
|
|
PROXY=
|
|
|
|
##########################
|
|
# Search:
|
|
##########################
|
|
|
|
# ENABLING SEARCH MESSAGES/CONVOS
|
|
# Requires the installation of the free self-hosted Meilisearch or a paid Remote Plan (Remote not tested)
|
|
# The easiest setup for this is through docker-compose, which takes care of it for you.
|
|
SEARCH=true
|
|
|
|
# REQUIRED FOR SEARCH: MeiliSearch Host, mainly for the API server to connect to the search server.
|
|
# Replace '0.0.0.0' with 'meilisearch' if serving MeiliSearch with docker-compose.
|
|
MEILI_HOST=http://0.0.0.0:7700
|
|
|
|
# REQUIRED FOR SEARCH: MeiliSearch HTTP Address, mainly for docker-compose to expose the search server.
|
|
# Replace '0.0.0.0' with 'meilisearch' if serving MeiliSearch with docker-compose.
|
|
MEILI_HTTP_ADDR=0.0.0.0:7700
|
|
|
|
# REQUIRED FOR SEARCH: In production env., a secure key is needed. You can generate your own.
|
|
# This master key must be at least 16 bytes, composed of valid UTF-8 characters.
|
|
# MeiliSearch will throw an error and refuse to launch if no master key is provided,
|
|
# or if it is under 16 bytes. MeiliSearch will suggest a secure autogenerated master key.
|
|
# Using docker, it seems recognized as production so use a secure key.
|
|
# This is a ready made secure key for docker-compose, you can replace it with your own.
|
|
MEILI_MASTER_KEY=DrhYf7zENyR6AlUCKmnz0eYASOQdl6zxH7s7MKFSfFCt
|
|
|
|
##########################
|
|
# User System:
|
|
##########################
|
|
|
|
# Allow Public Registration
|
|
ALLOW_REGISTRATION=true
|
|
|
|
# JWT Secrets
|
|
JWT_SECRET=secret
|
|
JWT_REFRESH_SECRET=secret
|
|
|
|
# Google:
|
|
# Add your Google Client ID and Secret here, you must register an app with Google Cloud to get these values
|
|
# https://cloud.google.com/
|
|
GOOGLE_CLIENT_ID=
|
|
GOOGLE_CLIENT_SECRET=
|
|
GOOGLE_CALLBACK_URL=/oauth/google/callback
|
|
|
|
# OpenID:
|
|
# See OpenID provider to get the below values
|
|
# Create random string for OPENID_SESSION_SECRET
|
|
# For Azure AD
|
|
# ISSUER: https://login.microsoftonline.com/(tenant id)/v2.0/
|
|
# SCOPE: openid profile email
|
|
OPENID_CLIENT_ID=
|
|
OPENID_CLIENT_SECRET=
|
|
OPENID_ISSUER=
|
|
OPENID_SESSION_SECRET=
|
|
OPENID_SCOPE="openid profile email"
|
|
OPENID_CALLBACK_URL=/oauth/openid/callback
|
|
# If LABEL and URL are left empty, then the default OpenID label and logo are used.
|
|
VITE_OPENID_LABEL=
|
|
VITE_OPENID_URL=
|
|
|
|
# Set the expiration delay for the secure cookie with the JWT token
|
|
# Delay is in millisecond e.g. 7 days is 1000*60*60*24*7
|
|
SESSION_EXPIRY=(1000 * 60 * 60 * 24) * 7
|
|
|
|
###########################
|
|
# Application Domains
|
|
###########################
|
|
|
|
# Note:
|
|
# Server = Backend
|
|
# Client = Public (the client is the url you visit)
|
|
# For the Google login to work in dev mode, you will need to change DOMAIN_SERVER to localhost:3090 or place it in .env.development
|
|
|
|
DOMAIN_CLIENT=http://localhost:3080
|
|
DOMAIN_SERVER=http://localhost:3080
|