NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

Add feature: Support for multiple models on Azure and Azure model mapper

Open shendongming opened this issue 2 years ago • 4 comments

Added support for multiple models on Azure; in practice, we will deploy several models on Azure, such as gpt-4, gpt-3.5, etc.

Two changes:

  1. Added a new configuration item: AZURE_OPENAI_MODEL_MAPPER
  2. Extended the configuration item: AZURE_URL

The changes are as follows:

AZURE_URL (optional)

Example: https://{azure-resource-url}/openai/deployments/{deploy-name}

Example: https://xxx.openai.azure.com/openai/deployments/{deploy-name}

Azure deploy url.

If {deploy-name} is using the template mode, then it will automatically replace the path based on the model selected by the client. If your model name is different from the deployment name, then you need to set the AZURE_OPENAI_MODEL_MAPPER parameter.

AZURE_OPENAI_MODEL_MAPPER (optional)

Default: Empty Example: gpt-3.5-turbo=gpt-35-turbo means map gpt-3.5-turbo to gpt-35-turbo

If you are deploying ChatGPT using Azure OpenAI, it is recommended to set the AZURE_OPENAI_MODEL_MAPPER. The session summarization feature relies on the gpt-3.5-turbo model, unless the name of your Azure deployment is the same as it.

shendongming avatar Nov 22 '23 02:11 shendongming

[!WARNING]
The KnowledgeCutOffDate is intended for system prompts. Exercise caution when changing it, as it must be correctly aligned with the models.

H0llyW00dzZ avatar Nov 27 '23 02:11 H0llyW00dzZ

Thank you I have set KnowledgeCutOffDate to 2021-09 @H0llyW00dzZ

shendongming avatar Dec 01 '23 06:12 shendongming

Someone is attempting to deploy a commit to the NextChat Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 29 '24 13:03 vercel[bot]

Your build has completed!

Preview deployment

github-actions[bot] avatar Mar 29 '24 13:03 github-actions[bot]