Skip to content

Correct withStructuredOutput usage in plan-and-execute example #1148

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adouz
Copy link

@adouz adouz commented May 4, 2025

The plan-and-excute example currently passes the entire planFunction object to withStructuredOutput, which results in the model returning unparsed JSON.

This PR updates the example to correctly pass only planFunction.parameters — the actual JSON schema expected by withStructuredOutput — ensuring the model produces properly parsed structured

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant