mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
fix: md repair
This commit is contained in:
@@ -59,6 +59,11 @@ export async function fixMarkdown(
|
|||||||
console.log(TOOL_NAME, result.text);
|
console.log(TOOL_NAME, result.text);
|
||||||
console.log('repaired before/after', mdContent.length, result.text.length);
|
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;
|
return result.text;
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user