Skip to content

Commit

Permalink
Fixed languagePrefix bug, not deployed yet
Browse files Browse the repository at this point in the history
  • Loading branch information
TomFrankly committed Sep 27, 2023
1 parent 83907e8 commit 86dd73c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Notion-Voice-Notes.mjs
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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".
Expand Down

0 comments on commit 86dd73c

Please sign in to comment.