From 86dd73ce939e28827944ee4f9a59113f57cf8846 Mon Sep 17 00:00:00 2001 From: Thomas Frank Date: Tue, 26 Sep 2023 19:16:42 -0600 Subject: [PATCH] Fixed languagePrefix bug, not deployed yet --- Notion-Voice-Notes.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Notion-Voice-Notes.mjs b/Notion-Voice-Notes.mjs index c96a965..3dd6bf2 100644 --- a/Notion-Voice-Notes.mjs +++ b/Notion-Voice-Notes.mjs @@ -1,3 +1,9 @@ +/** + * Changes: + * + * - Fixed languagePrefix bug; it no longer prints "undefined" in the system message. + */ + import { Client } from "@notionhq/client"; import Bottleneck from "bottleneck"; import OpenAI from "openai"; @@ -812,7 +818,7 @@ export default { languagePrefix = ` You will write your summary in ${language.label} (ISO 639-1 code: "${language.value}").` } - prompt.base = `You are an assistant that summarizes voice notes, podcasts, lecture recordings, and other audio recordings that primarily involve human speech. You only write valid JSON.${languagePrefix} + prompt.base = `You are an assistant that summarizes voice notes, podcasts, lecture recordings, and other audio recordings that primarily involve human speech. You only write valid JSON.${languagePrefix ? languagePrefix : ''} If the speaker in a transcript identifies themselves, use their name in your summary content instead of writing generic terms like "the speaker". If they do not, you can write "the speaker".