Skip to content

Commit 646c135

Browse files
committed
fix: conversation history in bing mode
1 parent b70a38b commit 646c135

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/background/apis/bing-web.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export async function generateAnswersWithBingWebApi(
5858
session.bingWeb.clientId = response.clientId
5959
session.bingWeb.invocationId = response.invocationId
6060

61+
session.conversationRecords.push({ question: question, answer: answer })
62+
console.debug('conversation history', { content: session.conversationRecords })
6163
port.onMessage.removeListener(stopListener)
62-
port.postMessage({ answer: response.response, done: true, session: session })
64+
port.postMessage({ answer: answer, done: true, session: session })
6365
}

0 commit comments

Comments
 (0)