Skip to content

Commit

Permalink
Merge pull request #11 from quipper/hello-gpt-4o
Browse files Browse the repository at this point in the history
Hello gpt-4o
  • Loading branch information
chaspy authored May 27, 2024
2 parents ced12f6 + 2156937 commit f68c149
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ type Message = {

async function requestAzureOpenAI(apiKey: string, messages: Message[]) {
const OPENAI_RESOURCE_ID = "ask-chatgpt";
const DEPLOYMENT_ID = "gpt-4";
const API_VERSION = "2024-02-15-preview";
const DEPLOYMENT_ID = "gpt-4o";
const API_VERSION = "2024-02-01";
const res = await fetch(
`https://${OPENAI_RESOURCE_ID}.openai.azure.com/openai/deployments/${DEPLOYMENT_ID}/chat/completions?api-version=${API_VERSION}`,
{
Expand All @@ -127,7 +127,7 @@ async function requestAzureOpenAI(apiKey: string, messages: Message[]) {
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gpt-4",
model: "gpt-4o",
messages: messages,
}),
}
Expand Down

0 comments on commit f68c149

Please sign in to comment.