From 35e7b8ef6f166901c8883fd09ef723952d8900e4 Mon Sep 17 00:00:00 2001 From: Rasukarusan <7gta0you1tube000@gmail.com> Date: Sun, 7 Apr 2024 09:40:01 +0900 Subject: [PATCH] =?UTF-8?q?Cohere=E3=81=AE=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=A0=E3=82=A8=E3=83=B3=E3=83=89=E3=83=9D=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 2 +- .gitignore | 2 +- docker-compose.yml | 3 ++ librechat.yaml | 100 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 librechat.yaml diff --git a/.dockerignore b/.dockerignore index 396f0da3e57..63dd5552361 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,7 +9,7 @@ # Specific patterns to ignore data-node meili_data* -librechat* +# librechat* Dockerfile* docs diff --git a/.gitignore b/.gitignore index c55115988b9..0e7f967c9ca 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ bower_components/ .flooignore #config file -librechat.yaml +# librechat.yaml librechat.yml # Environment diff --git a/docker-compose.yml b/docker-compose.yml index 409a0528cab..d1a2b255bee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,9 @@ services: - type: bind source: ./.env target: /app/.env + - type: bind + source: ./librechat.yaml + target: /app/librechat.yaml - ./images:/app/client/public/images - ./logs:/app/api/logs mongodb: diff --git a/librechat.yaml b/librechat.yaml new file mode 100644 index 00000000000..96bbab171f7 --- /dev/null +++ b/librechat.yaml @@ -0,0 +1,100 @@ +version: 1.0.5 +cache: true +# fileStrategy: "firebase" # If using Firebase CDN +fileConfig: + endpoints: + assistants: + fileLimit: 5 + # Maximum size for an individual file in MB + fileSizeLimit: 10 + # Maximum total size for all files in a single request in MB + totalSizeLimit: 50 + # In case you wish to limit certain filetypes + # supportedMimeTypes: + # - "image/.*" + # - "application/pdf" + openAI: + # Disables file uploading to the OpenAI endpoint + disabled: true + default: + totalSizeLimit: 20 + # Example for custom endpoints + # YourCustomEndpointName: + # fileLimit: 2 + # fileSizeLimit: 5 + # Global server file size limit in MB + serverFileSizeLimit: 100 + # Limit for user avatar image size in MB, default: 2 MB + avatarSizeLimit: 4 +rateLimits: + fileUploads: + ipMax: 100 + # Rate limit window for file uploads per IP + ipWindowInMinutes: 60 + userMax: 50 + # Rate limit window for file uploads per user + userWindowInMinutes: 60 +registration: + socialLogins: ["google", "facebook", "github", "discord", "openid"] + allowedDomains: + - "example.com" + - "anotherdomain.com" +endpoints: + assistants: + # Disable Assistants Builder Interface by setting to `true` + disableBuilder: false + # Polling interval for checking assistant updates + pollIntervalMs: 750 + # Timeout for assistant operations + timeoutMs: 180000 + # 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: + - name: "cohere" + apiKey: "${COHERE_API_KEY}" + baseURL: "https://api.cohere.ai/v1" + models: + default: ["command-r-plus"] + fetch: false + modelDisplayLabel: "cohere" + titleModel: "command" + dropParams: ["stop", "user", "frequency_penalty", "presence_penalty", "temperature", "top_p"] + # - name: "Mistral" + # apiKey: "${MISTRAL_API_KEY}" + # baseURL: "https://api.mistral.ai/v1" + # models: + # default: ["mistral-tiny", "mistral-small", "mistral-medium", "mistral-large-latest"] + # # Attempt to dynamically fetch available models + # fetch: true + # userIdQuery: false + # iconURL: "https://example.com/mistral-icon.png" + # titleConvo: true + # titleModel: "mistral-tiny" + # modelDisplayLabel: "Mistral AI" + # # addParams: + # # Mistral API specific value for moderating messages + # # safe_prompt: true + # dropParams: + # - "stop" + # - "user" + # - "presence_penalty" + # - "frequency_penalty" + # # headers: + # # x-custom-header: "${CUSTOM_HEADER_VALUE}" + # - name: "OpenRouter" + # apiKey: "${OPENROUTER_API_KEY}" + # baseURL: "https://openrouter.ai/api/v1" + # models: + # default: ["gpt-3.5-turbo"] + # fetch: false + # titleConvo: true + # titleModel: "gpt-3.5-turbo" + # modelDisplayLabel: "OpenRouter" + # dropParams: + # - "stop" + # - "frequency_penalty"