mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-25 22:16:49 +08:00
add debug logs for better tracing of fallback generation issues
This commit is contained in:
parent
8c59c2cb7e
commit
089e97e9d3
@ -186,9 +186,11 @@ export class ObjectGeneratorSafe {
|
||||
|
||||
if (NoObjectGeneratedError.isInstance(parseError)) {
|
||||
failedOutput = (parseError as any).text;
|
||||
logDebug(`Failed output: ${failedOutput}`);
|
||||
// find last `"url":` appear in the string, which is the source of the problem
|
||||
failedOutput = failedOutput.slice(0, Math.min(failedOutput.lastIndexOf('"url":'), 8000));
|
||||
}
|
||||
logDebug(`Prompt: ${failedOutput}`);
|
||||
|
||||
// Create a distilled version of the schema without descriptions
|
||||
const distilledSchema = this.createDistilledSchema(schema);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user