mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
fix: streaming msg
This commit is contained in:
@@ -51,7 +51,7 @@ ${i + 1}. [${ref.exactQuote}](${ref.url})`).join('')}
|
||||
</references>
|
||||
`.trim();
|
||||
}
|
||||
return `${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)}\n${refStr}`;
|
||||
return `${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)}\n\n${refStr}`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ export class ActionTracker extends EventEmitter {
|
||||
}
|
||||
|
||||
trackThink(think: string) {
|
||||
// update the think field of the current step
|
||||
this.trackAction({thisStep: {...this.state.thisStep, think}});
|
||||
// only update the think field of the current state
|
||||
this.state = { ...this.state, thisStep: { ...this.state.thisStep, think } };
|
||||
this.emit('action', this.state);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user