From bd76c23446105666812413d5bccb2454c5cb8235 Mon Sep 17 00:00:00 2001 From: ishan dutta Date: Fri, 16 Feb 2024 08:18:56 +0530 Subject: [PATCH] minor --- src/background/providers/chatgpt.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/background/providers/chatgpt.ts b/src/background/providers/chatgpt.ts index 4d45311..b6cdbcd 100644 --- a/src/background/providers/chatgpt.ts +++ b/src/background/providers/chatgpt.ts @@ -249,7 +249,7 @@ export class ChatGPTProvider implements Provider { finaltext += text if (countWords(text) == 1 && data.message?.author?.role == 'assistant') { if (params.prompt.indexOf('search query:') !== -1) { - this.renameConversationTitle(data.conversation_id) + this.renameConversationTitle(data.conversation_id, params) } } params.onEvent({ @@ -345,7 +345,7 @@ export class ChatGPTProvider implements Provider { if (text) { if (countWords(text) == 1 && data.message?.author?.role == 'assistant') { if (params.prompt.indexOf('search query:') !== -1) { - this.renameConversationTitle(data.conversation_id) + this.renameConversationTitle(data.conversation_id, params) } } params.onEvent({ @@ -400,7 +400,7 @@ export class ChatGPTProvider implements Provider { return resp } - async renameConversationTitle(convId: string) { + async renameConversationTitle(convId: string, params: GenerateAnswerParams) { const titl: string = getConversationTitle(params.prompt) console.log('renameConversationTitle:', this.token, convId, titl) setConversationProperty(this.token, convId, { title: titl })