diff --git a/LibreChat b/LibreChat index 3999e85..3058cfa 160000 --- a/LibreChat +++ b/LibreChat @@ -1 +1 @@ -Subproject commit 3999e852a8be7412240ccfe5dff417e1eb4fe010 +Subproject commit 3058cfa875acb0dccc42e242eb1f6dc19a064156 diff --git a/compose/config/librechat.yaml b/compose/config/librechat.yaml new file mode 100644 index 0000000..0903ac7 --- /dev/null +++ b/compose/config/librechat.yaml @@ -0,0 +1,144 @@ +# For more information, see the Configuration Guide: +# https://docs.librechat.ai/install/configuration/custom_config.html + +# Configuration version (required) +version: 1.0.6 + +# Cache settings: Set to true to enable caching +cache: true + +# Custom nterface configuration +interface: + # Privacy policy settings + privacyPolicy: + externalUrl: 'https://librechat.ai/privacy-policy' + openNewTab: true + + # Terms of service + termsOfService: + externalUrl: 'https://librechat.ai/tos' + openNewTab: true + +# Example Registration Object Structure (optional) +registration: + socialLogins: ['github', 'google', 'discord', 'openid', 'facebook'] + # allowedDomains: + # - "gmail.com" +# rateLimits: +# fileUploads: +# ipMax: 100 +# ipWindowInMinutes: 60 # Rate limit window for file uploads per IP +# userMax: 50 +# userWindowInMinutes: 60 # Rate limit window for file uploads per user + +# Definition of custom endpoints +endpoints: + # assistants: + # disableBuilder: false # Disable Assistants Builder Interface by setting to `true` + # pollIntervalMs: 750 # Polling interval for checking assistant updates + # timeoutMs: 180000 # Timeout for assistant operations + # # Should only be one or the other, either `supportedIds` or `excludedIds` + # supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"] + # # excludedIds: ["asst_excludedAssistantId"] + # # (optional) Models that support retrieval, will default to latest known OpenAI models that support the feature + # retrievalModels: ["gpt-4-turbo-preview"] + # # (optional) Assistant Capabilities available to all users. Omit the ones you wish to exclude. Defaults to list below. + # capabilities: ["code_interpreter", "retrieval", "actions", "tools", "image_vision"] + custom: + # Groq Example + - name: 'groq' + apiKey: '${GROQ_API_KEY}' + baseURL: 'https://api.groq.com/openai/v1/' + models: + default: [ + "llama3-70b-8192", + "llama3-8b-8192", + "llama2-70b-4096", + "mixtral-8x7b-32768", + "gemma-7b-it", + ] + fetch: false + titleConvo: true + titleModel: 'llama3-70b-8192' + modelDisplayLabel: 'groq' + + # # Mistral AI Example + # - name: 'Mistral' # Unique name for the endpoint + # # For `apiKey` and `baseURL`, you can use environment variables that you define. + # # recommended environment variables: + # apiKey: '${MISTRAL_API_KEY}' + # baseURL: 'https://api.mistral.ai/v1' + + # # Models configuration + # models: + # # List of default models to use. At least one value is required. + # default: ['mistral-tiny', 'mistral-small', 'mistral-medium'] + # # Fetch option: Set to true to fetch models from API. + # fetch: true # Defaults to false. + + # # Optional configurations + + # # Title Conversation setting + # titleConvo: true # Set to true to enable title conversation + + # # Title Method: Choose between "completion" or "functions". + # # titleMethod: "completion" # Defaults to "completion" if omitted. + + # # Title Model: Specify the model to use for titles. + # titleModel: 'mistral-tiny' # Defaults to "gpt-3.5-turbo" if omitted. + + # # Summarize setting: Set to true to enable summarization. + # # summarize: false + + # # Summary Model: Specify the model to use if summarization is enabled. + # # summaryModel: "mistral-tiny" # Defaults to "gpt-3.5-turbo" if omitted. + + # # Force Prompt setting: If true, sends a `prompt` parameter instead of `messages`. + # # forcePrompt: false + + # # The label displayed for the AI model in messages. + # modelDisplayLabel: 'Mistral' # Default is "AI" when not set. + + # # Add additional parameters to the request. Default params will be overwritten. + # # addParams: + # # safe_prompt: true # This field is specific to Mistral AI: https://docs.mistral.ai/api/ + + # # Drop Default params parameters from the request. See default params in guide linked below. + # # NOTE: For Mistral, it is necessary to drop the following parameters or you will encounter a 422 Error: + # dropParams: ['stop', 'user', 'frequency_penalty', 'presence_penalty'] + + # # OpenRouter Example + # - name: 'OpenRouter' + # # For `apiKey` and `baseURL`, you can use environment variables that you define. + # # recommended environment variables: + # # Known issue: you should not use `OPENROUTER_API_KEY` as it will then override the `openAI` endpoint to use OpenRouter as well. + # apiKey: '${OPENROUTER_KEY}' + # baseURL: 'https://openrouter.ai/api/v1' + # models: + # default: ['gpt-3.5-turbo'] + # fetch: true + # titleConvo: true + # titleModel: 'gpt-3.5-turbo' + # # Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens. + # dropParams: ['stop'] + # modelDisplayLabel: 'OpenRouter' +# fileConfig: +# endpoints: +# assistants: +# fileLimit: 5 +# fileSizeLimit: 10 # Maximum size for an individual file in MB +# totalSizeLimit: 50 # Maximum total size for all files in a single request in MB +# supportedMimeTypes: +# - "image/.*" +# - "application/pdf" +# openAI: +# disabled: true # Disables file uploading to the OpenAI endpoint +# default: +# totalSizeLimit: 20 +# YourCustomEndpointName: +# fileLimit: 2 +# fileSizeLimit: 5 +# serverFileSizeLimit: 100 # Global server file size limit in MB +# avatarSizeLimit: 2 # Limit for user avatar image size in MB +# See the Custom Configuration Guide for more information: +# https://docs.librechat.ai/install/configuration/custom_config.html diff --git a/compose/deploy-librechat.yml b/compose/deploy-librechat.yml new file mode 100644 index 0000000..67c8576 --- /dev/null +++ b/compose/deploy-librechat.yml @@ -0,0 +1,81 @@ +# Do not edit this file directly. Use a ‘docker-compose.override.yaml’ file if you can. +# Refer to `docker-compose.override.yaml.example’ for some sample configurations. + +volumes: + data-node: + pgdata2: + libre-images: + libre-logs: + meili_data: + +services: + api: + container_name: LibreChat + ports: + - "${PORT}:${PORT}" + depends_on: + - mongodb + - rag_api + image: ghcr.io/danny-avila/librechat-dev:latest + restart: always + user: "${UID}:${GID}" + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + - HOST=0.0.0.0 + - MONGO_URI=mongodb://mongodb:27017/LibreChat + - MEILI_HOST=http://meilisearch:7700 + - RAG_PORT=${RAG_PORT:-8000} + - RAG_API_URL=http://rag_api:${RAG_PORT:-8000} + volumes: + - type: bind + source: ./.env + target: /app/.env + - libre-images:/app/client/public/images + - libre-logs:/app/api/logs + - type: bind + source: ./config/librechat.yaml + target: /app/librechat.yaml + mongodb: + container_name: chat-mongodb + image: mongo + restart: always + user: "${UID}:${GID}" + volumes: + - data-node:/data/db + command: mongod --noauth + meilisearch: + container_name: chat-meilisearch + image: getmeili/meilisearch:v1.7.3 + restart: always + user: "${UID}:${GID}" + environment: + - MEILI_HOST=http://meilisearch:7700 + - MEILI_NO_ANALYTICS=true + volumes: + - meili_data:/meili_data + vectordb: + container_name: vectordb + image: ankane/pgvector:latest + environment: + POSTGRES_DB: mydatabase + POSTGRES_USER: myuser + POSTGRES_PASSWORD: mypassword + restart: always + volumes: + - pgdata2:/var/lib/postgresql/data + rag_api: + container_name: rag_api + image: ghcr.io/danny-avila/librechat-rag-api-dev:latest + environment: + POSTGRES_DB: mydatabase + POSTGRES_USER: myuser + POSTGRES_PASSWORD: mypassword + DB_HOST: vectordb + RAG_PORT: ${RAG_PORT:-8000} + restart: always + depends_on: + - vectordb + env_file: + - .env +