mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 11:19:02 +08:00
Merge branch 'nsc/__experimental_streamSteps'
This commit is contained in:
commit
23d3257a57
@ -54,6 +54,19 @@ export async function updateExtract(
|
||||
extract.steps = [...current.steps, ...extract.steps];
|
||||
}
|
||||
|
||||
// Limit links in steps to 500
|
||||
if (extract.steps) {
|
||||
extract.steps = extract.steps.map(step => {
|
||||
if (step.discoveredLinks && step.discoveredLinks.length > 500) {
|
||||
return {
|
||||
...step,
|
||||
discoveredLinks: step.discoveredLinks.slice(0, 500)
|
||||
};
|
||||
}
|
||||
return step;
|
||||
});
|
||||
}
|
||||
|
||||
await redisConnection.set(
|
||||
"extract:" + id,
|
||||
JSON.stringify({ ...current, ...extract }),
|
||||
|
@ -256,7 +256,7 @@ export async function performExtraction(
|
||||
step: ExtractStep.MULTI_ENTITY_SCRAPE,
|
||||
startedAt: Date.now(),
|
||||
finishedAt: Date.now(),
|
||||
discoveredLinks: [],
|
||||
discoveredLinks: links,
|
||||
},
|
||||
],
|
||||
});
|
||||
@ -510,7 +510,7 @@ export async function performExtraction(
|
||||
step: ExtractStep.EXTRACT,
|
||||
startedAt: Date.now(),
|
||||
finishedAt: Date.now(),
|
||||
discoveredLinks: [],
|
||||
discoveredLinks: links,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user