Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ishandutta2007 committed Feb 16, 2024
1 parent cc92176 commit bd76c23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/background/providers/chatgpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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 })
Expand Down

0 comments on commit bd76c23

Please sign in to comment.