mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +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)) {
|
if (NoObjectGeneratedError.isInstance(parseError)) {
|
||||||
failedOutput = (parseError as any).text;
|
failedOutput = (parseError as any).text;
|
||||||
|
logDebug(`Failed output: ${failedOutput}`);
|
||||||
// find last `"url":` appear in the string, which is the source of the problem
|
// find last `"url":` appear in the string, which is the source of the problem
|
||||||
failedOutput = failedOutput.slice(0, Math.min(failedOutput.lastIndexOf('"url":'), 8000));
|
failedOutput = failedOutput.slice(0, Math.min(failedOutput.lastIndexOf('"url":'), 8000));
|
||||||
}
|
}
|
||||||
|
logDebug(`Prompt: ${failedOutput}`);
|
||||||
|
|
||||||
// Create a distilled version of the schema without descriptions
|
// Create a distilled version of the schema without descriptions
|
||||||
const distilledSchema = this.createDistilledSchema(schema);
|
const distilledSchema = this.createDistilledSchema(schema);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user