From 4078c5283b199c148f212fb462fb39dfa30d90d4 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 16 Mar 2023 15:02:40 -0400 Subject: [PATCH] fix: add deterministic titling --- api/app/titleConvo.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/app/titleConvo.js b/api/app/titleConvo.js index e37fcb3b0c..a089d6ca76 100644 --- a/api/app/titleConvo.js +++ b/api/app/titleConvo.js @@ -34,11 +34,14 @@ const titleConvo = async ({ model, text, response }) => { }, { role: 'user', - content: `In 5 words or less, summarize the conversation below with a title in title case using the language the user writes in. Don't refer to the participants of the conversation by name. Do not include punctuation or quotation marks. Your response should be in title case, exclusively containing the title. Conversation:\n\nUser: "${text}"\n\n${model}: "${JSON.stringify( + content: `In 5 words or less, summarize the conversation below with a title in title case using the language the user writes in. Don't refer to the participants of the conversation nor the language. Do not include punctuation or quotation marks. Your response should be in title case, exclusively containing the title. Conversation:\n\nUser: "${text}"\n\n${model}: "${JSON.stringify( response?.text )}"\n\nTitle: ` } - ] + ], + temperature: 0, + presence_penalty: 0, + frequency_penalty: 0, }, { proxy: proxyEnvToAxiosProxy(process.env.PROXY || null) } );