Update azure openai api verion. (#1340)

This is needed to run o1 and o3 mini model.
This commit is contained in:
Pengcheng Liu
2025-03-10 16:29:12 +08:00
committed by GitHub
parent b31739fe10
commit 1e41add459

View File

@@ -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=2023-03-15-preview`
const endpoint = `https://${this.config.azureOpenAIApiInstanceName}.openai.azure.com/openai/deployments/${this.config.azureOpenAIApiDeploymentName}/chat/completions?api-version=2025-01-01-preview`
return fetch(endpoint, {
method: 'POST',
signal,