Replace the retiring Azure OpenAI API version with the GA version (#94)

Reference:
- https://learn.microsoft.com/en-us/azure/ai-services/openai/api-version-deprecation#retiring-soon
This commit is contained in:
Peter Dave Hello
2024-05-23 18:50:39 +08:00
committed by GitHub
parent 7a8ff2ceb0
commit bf4bce32c1
3 changed files with 10 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ func Init() error {
openaiModelMapper = viper.GetString(constant.ENV_AZURE_OPENAI_MODEL_MAPPER)
if endpoint != "" {
if apiVersion == "" {
apiVersion = "2023-07-01-preview"
apiVersion = "2024-02-01"
}
InitFromEnvironmentVariables(apiVersion, endpoint, openaiModelMapper)
} else {