From 192374c1f85b7631b8ee228520f9ed08a07e53fc Mon Sep 17 00:00:00 2001 From: Danny Avila <110412045+danny-avila@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:50:04 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=91=20docs:=20Update=20Mistral=20AI=20?= =?UTF-8?q?API=20example=20about=20`dropParams`=20(#1538)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/install/configuration/custom_config.md | 9 ++++++--- librechat.example.yaml | 9 +++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/install/configuration/custom_config.md b/docs/install/configuration/custom_config.md index b9802fe0518..cbd813af204 100644 --- a/docs/install/configuration/custom_config.md +++ b/docs/install/configuration/custom_config.md @@ -104,6 +104,7 @@ Each endpoint in the `custom` array should have the following structure: # Example Endpoint Object Structure endpoints: custom: + # Example using Mistral AI API - name: "Mistral" apiKey: "${YOUR_ENV_VAR_KEY}" baseURL: "https://api.mistral.ai/v1" @@ -117,7 +118,8 @@ endpoints: modelDisplayLabel: "Mistral" addParams: safe_mode: true - dropParams: ["stop", "temperature", "top_p"] + # 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"] ``` ### **name**: @@ -249,7 +251,7 @@ endpoints: - Type: Array/List of Strings - **Description**: Excludes specified [default parameters](#default-parameters). Useful for APIs that do not accept or recognize certain parameters. - - **Example**: `dropParams: ["stop", "temperature", "top_p"]` + - **Example**: `dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]` - **Note**: For a list of default parameters sent with every request, see the ["Default Parameters"](#default-parameters) Section below. ## Additional Notes - Ensure that all URLs and keys are correctly specified to avoid connectivity issues. @@ -314,7 +316,8 @@ endpoints: modelDisplayLabel: "Mistral" addParams: safe_mode: true - dropParams: ["stop", "temperature", "top_p"] + # 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.ai API - name: "OpenRouter" diff --git a/librechat.example.yaml b/librechat.example.yaml index 047cfbcb303..919bb829f46 100644 --- a/librechat.example.yaml +++ b/librechat.example.yaml @@ -49,12 +49,9 @@ endpoints: safe_mode: 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. - dropParams: ["stop", "temperature", "top_p"] - # - stop # dropped since it's not recognized by Mistral AI API - # `temperature` and `top_p` are removed to allow Mistral AI API defaults to be used: - # - temperature - # - top_p - + # 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.ai Example - name: "OpenRouter" # For `apiKey` and `baseURL`, you can use environment variables that you define.