Skip to content

Commit

Permalink
Update api.ts
Browse files Browse the repository at this point in the history
Update Azure API version. Sorry for closing PR by mistake earlier.
https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
  • Loading branch information
yfw918 authored Nov 8, 2023
1 parent 3e501ea commit a800946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getChatCompletion = async (

const model = config.model === 'gpt-3.5-turbo' ? 'gpt-35-turbo' : config.model === 'gpt-3.5-turbo-16k' ? 'gpt-35-turbo-16k' : config.model;

const apiVersion = '2023-03-15-preview';
const apiVersion = '2023-09-01-preview';

const path = `openai/deployments/${model}/chat/completions?api-version=${apiVersion}`;

Expand Down Expand Up @@ -65,7 +65,7 @@ export const getChatCompletionStream = async (

const model = config.model === 'gpt-3.5-turbo' ? 'gpt-35-turbo' : config.model === 'gpt-3.5-turbo-16k' ? 'gpt-35-turbo-16k' : config.model;

const apiVersion = '2023-03-15-preview';
const apiVersion = '2023-09-01-preview';

const path = `openai/deployments/${model}/chat/completions?api-version=${apiVersion}`;

Expand Down

0 comments on commit a800946

Please sign in to comment.