mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: url sanitization
This commit is contained in:
parent
9f97d266de
commit
85435a903f
@ -169,7 +169,7 @@ export class ObjectGeneratorSafe {
|
||||
// Create a distilled version of the schema without descriptions
|
||||
const distilledSchema = this.createDistilledSchema(schema);
|
||||
// find last `"url":` appear in the string, which is the source of the problem
|
||||
const tailoredOutput = failedOutput.slice(0, Math.min(failedOutput.lastIndexOf('"url":'), 5000));
|
||||
const tailoredOutput = failedOutput.slice(0, Math.min(failedOutput.lastIndexOf('"url":'), 8000));
|
||||
|
||||
const fallbackResult = await generateObject({
|
||||
model: fallbackModel,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user