mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: remove references tag in output
This commit is contained in:
parent
013ad3574f
commit
63a9bb9fe2
@ -41,13 +41,13 @@ function buildMdFromAnswer(answer: AnswerAction) {
|
||||
return `[^${i + 1}]: [${escapedQuote}](${ref.url})`;
|
||||
}).join('\n\n');
|
||||
|
||||
return `${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)}
|
||||
return `
|
||||
${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)}
|
||||
|
||||
<references>
|
||||
|
||||
${references}
|
||||
|
||||
</references>`;
|
||||
`.trim();
|
||||
}
|
||||
|
||||
async function* streamTextNaturally(text: string, streamingState: StreamingState) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user