From ed98de6be698c9a9b0440b414a7f52d5342a73ec Mon Sep 17 00:00:00 2001 From: Vikas Kapadiya Date: Tue, 30 Apr 2024 14:46:50 +0530 Subject: [PATCH] Update Azure OpenAI API version --- src/providers/azure/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/azure/api.ts b/src/providers/azure/api.ts index 2163af0..5ffd291 100644 --- a/src/providers/azure/api.ts +++ b/src/providers/azure/api.ts @@ -14,7 +14,7 @@ export const fetchChatCompletion = async(payload: AzureFetchPayload) => { body: JSON.stringify({ ...body }), signal, } - return fetch(`${baseUrl}/openai/deployments/${model}/chat/completions?api-version=2024-02-15-preview`, initOptions) + return fetch(`${baseUrl}/openai/deployments/${model}/chat/completions?api-version=2024-03-01-preview`, initOptions) } export const fetchImageGeneration = async(payload: AzureFetchPayload) => { @@ -24,5 +24,5 @@ export const fetchImageGeneration = async(payload: AzureFetchPayload) => { method: 'POST', body: JSON.stringify(body), } - return fetch(`${baseUrl}.openai.azure.com/openai/images/generations:submit?api-version=2024-02-15-preview`, initOptions) + return fetch(`${baseUrl}.openai.azure.com/openai/images/generations:submit?api-version=2024-03-01-preview`, initOptions) }