FantasyCopilot icon indicating copy to clipboard operation
FantasyCopilot copied to clipboard

[Feature] Add an option to set the api_version for Azure OpenAI

Open balthild opened this issue 2 years ago • 2 comments

Description

I'm attempting to use the HKUST's Azure OpenAI service (doc link), which only supports some specific API versions. If other API versions are used, it will result in a 404 error.

图片

2023-05-15 图片

2022-12-01 (although this version is listed in the docs...): 图片

Solution

The KernelBuilder from semantic-kernel accepts a config object containing the API version.

https://github.com/Richasy/FantasyCopilot/blob/491f18a75830dd45d421891a90bdb1c26eb6b5a2/src/Services/Services.Desktop/KernelService/KernelService.cs#L188C27-L188C57

https://github.com/microsoft/semantic-kernel/blob/d70bd6b3aeff651214f036435175449128d68bd3/dotnet/src/Connectors/Connectors.AI.OpenAI/OpenAIKernelBuilderExtensions.cs#L341

Plan B

No response

Additional

No response

balthild avatar Oct 23 '23 18:10 balthild

Hi @balthild , I understand your appeal, but unfortunately, Semantic Kernel does not provide api version configuration for basic chat. What you provide is AzureChatCompletionWithDataConfig, which requires the client to provide the name and key of the associated database. This is usually used in professional data models and does not apply to your situation.

Until Semantic Kernel implements this feature (or I have time to submit a PR to SK), I will not be able to provide effective help for the time being.

Richasy avatar Oct 31 '23 13:10 Richasy

Oh... didn't notice that. Thanks for the clarification.

balthild avatar Oct 31 '23 14:10 balthild