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