mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: md repair
This commit is contained in:
parent
e3a7a4c393
commit
e5674947d5
@ -59,6 +59,11 @@ export async function fixMarkdown(
|
||||
console.log(TOOL_NAME, result.text);
|
||||
console.log('repaired before/after', mdContent.length, result.text.length);
|
||||
|
||||
if (result.text.length < mdContent.length * 0.85) {
|
||||
console.error('repaired content is significantly shorter than original content, return original content instead.');
|
||||
return mdContent;
|
||||
}
|
||||
|
||||
return result.text;
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user