mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-15 11:22:23 +08:00
fix #539 bing web
This commit is contained in:
@@ -37,8 +37,8 @@ export async function generateAnswersWithBingWebApi(
|
||||
abortController: controller,
|
||||
toneStyle: modelMode,
|
||||
jailbreakConversationId: sydneyMode,
|
||||
onProgress: (token) => {
|
||||
answer += token
|
||||
onProgress: (message) => {
|
||||
answer = message
|
||||
// reference markers [^number^]
|
||||
answer = answer.replaceAll(/\[\^(\d+)\^\]/g, '<sup>$1</sup>')
|
||||
port.postMessage({ answer: answer, done: false, session: null })
|
||||
|
||||
@@ -490,8 +490,8 @@ export default class BingAIClient {
|
||||
return
|
||||
}
|
||||
// get the difference between the current text and the previous text
|
||||
const difference = updatedText.substring(replySoFar.length)
|
||||
onProgress(difference)
|
||||
// const difference = updatedText.substring(replySoFar.length)
|
||||
onProgress(updatedText)
|
||||
if (updatedText.trim().endsWith(stopToken)) {
|
||||
stopTokenFound = true
|
||||
// remove stop token from updated text
|
||||
|
||||
Reference in New Issue
Block a user