From 4173343f96683316d31c609f764547264d7e3cc4 Mon Sep 17 00:00:00 2001 From: kondo takeshi Date: Thu, 1 Aug 2024 10:23:23 +0900 Subject: [PATCH] Use gpt-4o mini --- function.ts | 6 +++--- manifest.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/function.ts b/function.ts index 0a93fa3..06dd4ae 100644 --- a/function.ts +++ b/function.ts @@ -115,8 +115,8 @@ type Message = { }; async function requestAzureOpenAI(apiKey: string, messages: Message[]) { - const OPENAI_RESOURCE_ID = "ask-chatgpt"; - const DEPLOYMENT_ID = "gpt-4o"; + const OPENAI_RESOURCE_ID = "ask-chatgpt-east-us"; + const DEPLOYMENT_ID = "gpt-4o-mini"; 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}`, @@ -127,7 +127,7 @@ async function requestAzureOpenAI(apiKey: string, messages: Message[]) { "Content-Type": "application/json", }, body: JSON.stringify({ - model: "gpt-4o", + model: "gpt-4o-mini", messages: messages, }), } diff --git a/manifest.ts b/manifest.ts index 8c6eed6..153102c 100644 --- a/manifest.ts +++ b/manifest.ts @@ -7,7 +7,7 @@ export default Manifest({ description: "workflow", icon: "assets/chatgpt.png", workflows: [ChatGPTWorkflow], - outgoingDomains: ["ask-chatgpt.openai.azure.com"], + outgoingDomains: ["ask-chatgpt-east-us.openai.azure.com"], datastores: [TalkHistoriesDatastore], botScopes: [ "commands",