From 285a4fa49b5c4a6e76d09b43cb1f4cd570dad2e3 Mon Sep 17 00:00:00 2001 From: "Satsuki Akiba (aider)" Date: Wed, 4 Jun 2025 11:24:30 +0900 Subject: [PATCH] feat: migrate to openai.chat.completions.create --- services/llm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/llm.ts b/services/llm.ts index bb6912a..5bb39c1 100644 --- a/services/llm.ts +++ b/services/llm.ts @@ -19,7 +19,7 @@ export async function openAI_GenerateScript(item: { 「今日のニュース記事をご紹介します…」といった導入も含め、約300文字程度でまとめてください。 `; - const response = await openai.createChatCompletion({ + const response = await openai.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: prompt.trim() }], temperature: 0.7,