fix: fix template literal errors in llm, podcast, and tts services

This commit is contained in:
2025-06-04 08:18:38 +09:00
parent 4fe300d5d6
commit a1cbf358ef
3 changed files with 19 additions and 19 deletions

View File

@ -10,15 +10,15 @@ export async function openAI_GenerateScript(item: {
link: string;
contentSnippet?: string;
}): Promise<string> {
const prompt = \`
const prompt = `
あなたはポッドキャスターです。以下の情報をもとに、リスナー向けにわかりやすい日本語のポッドキャスト原稿を書いてください。
- 記事タイトル: \${item.title}
- 記事リンク: \${item.link}
- 記事概要: \${item.contentSnippet || "なし"}
- 記事タイトル: ${item.title}
- 記事リンク: ${item.link}
- 記事概要: ${item.contentSnippet || "なし"}
「今日のニュース記事をご紹介します…」といった導入も含め、約300文字程度でまとめてください。
\`;
`;
const response = await openai.createChatCompletion({
model: "gpt-4o-mini",
messages: [{ role: "user", content: prompt.trim() }],