Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
描述
支持azure 的openai接口
参见:https://azure.microsoft.com/zh-cn/pricing/details/cognitive-services/openai-service/
增加下面环境变量
例如docker部署
BOT_NAME
为飞书机器人名称,例如chatGpt
AZURE_ON
为是否使用azure ,请填写true
AZURE_API_VERSION
为azure api版本 例如2023-03-15-preview
AZURE_RESOURCE_NAME
为azure 资源名称 类似https://{AZURE_RESOURCE_NAME}.openai.azure.com
AZURE_DEPLOYMENT_NAME
为azure 部署名称 类似https://{AZURE_RESOURCE_NAME}.openai.azure.com/deployments/{AZURE_DEPLOYMENT_NAME}/chat/completions
AZURE_OPENAI_TOKEN
为azure openai token注意
在azure模式下,
OPENAI_KEY
环境变量将自动失效相关问题