-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JS] Schema validation failed when using a tool #889
Comments
Thanks for reporting. Can you re-upload the trace as plain text? I am unable to read it. |
I saw that it had a weird format, but I just used the "export trace > save" option in the UI. Maybe another issue to report. In any case, here is the trace. I think the issue is in the generate.ts at the candidateError check: Line 668 in 2f6c7d8
c.data() is actually undefined. If I switch to:
Then it works fine.
|
Jep, I also have this problem. It seems the tool response is validated against the final output schema of the |
Describe the bug
I have a flow with a prompt defined with dotpromt with a json schema as output. When not using any tool the flow works fine, but when I added a tool the flow is failling because the Schema validation fails when the model replies that needs to use a tool.
To Reproduce
Expected behavior
GenKit handles the tool calling, calls the tool and calls again the model with the result.
Actual behavior
The flow fails with:
Runtime (please complete the following information):
MacOS
** Node version
v20.15.0
Additional context
I tried to use the
returnToolRequests: true,
to handle the reply myself but the same issue happens since the check is on the model reply.See trace logs:
b198423822c2d17f302dbd4674c0b6cc.txt
The text was updated successfully, but these errors were encountered: