From eda03d00ca83f9d0d30ab525c305d75e6dfe4fc7 Mon Sep 17 00:00:00 2001 From: liupengcheng Date: Sat, 11 Oct 2025 17:20:01 +0800 Subject: [PATCH] fix azure openai api version. This api version is not supported any more and azure allows not set api version when call chat completion api. --- src/app/bots/chatgpt-azure/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/bots/chatgpt-azure/index.ts b/src/app/bots/chatgpt-azure/index.ts index 193c6a67..7b0e5dde 100644 --- a/src/app/bots/chatgpt-azure/index.ts +++ b/src/app/bots/chatgpt-azure/index.ts @@ -13,7 +13,7 @@ export class ChatGPTAzureApiBot extends AbstractChatGPTApiBot { } async fetchCompletionApi(messages: ChatMessage[], signal?: AbortSignal) { - const endpoint = `https://${this.config.azureOpenAIApiInstanceName}.openai.azure.com/openai/deployments/${this.config.azureOpenAIApiDeploymentName}/chat/completions?api-version=2025-01-01-preview` + const endpoint = `https://${this.config.azureOpenAIApiInstanceName}.openai.azure.com/openai/deployments/${this.config.azureOpenAIApiDeploymentName}/chat/completions` return fetch(endpoint, { method: 'POST', signal,