Hey all! I’m having some issues sending the correct prompt to /chat/completions. My use case is the following:
- A phone call happens, this phone call produces an audio file.
- I send the phone call to whisper-1 to have it transcribed.
- I send the transcription to ChatGPT to have it summarized. I have some wishes though:
- The language of the summary should be the language spoken in the phone call. If the phone call is in Dutch, the summary should be written in Dutch.
- The summary should start with: This phone call was about… (Also should be translated to the phone call language)
- The summary should be in 3rd person, without mentioning any specific names.
- I append the summary to my app.
I have some issues with step 3, this is my current code:
let prompt_summary = "Please summarize the following phone call " + transcription;
let prompt_start_with = "Start the summary with: This phone call was about... "
let prompt_no_names = "Write the summary in 3rd person and dont mention any specific names. "
let prompt_translate =
"Please write the summary in the language that is spoken in the phone call. Make sure the summary is in professional and correct language";
// Perform the summarization via Ajax call
$.ajax({
url: "https://api.openai.com/v1/chat/completions",
type: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
},
data: JSON.stringify({
model: "gpt-3.5-turbo",
messages: [
{
role: "system",
content: prompt_summary,
},
{
role: "user",
content: prompt_start_with,
},
{
role: "user",
content: prompt_no_names,
},
{
role: "user",
content: prompt_translate,
}
],
temperature: 0.6,
}),
My issue is that it ignores most of my prompts, the summary is always in english, and names are always mentioned. Does anybody have any tips?