Skip to content

Fix weather agent example with UI #1851

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

Merged
merged 3 commits into from
May 28, 2025

Conversation

vp777
Copy link
Contributor

@vp777 vp777 commented May 28, 2025

There are two bugs, the first was introduced in the last commit. It set the tool call id to a dictionary instead of a string. He didnt notice since he used gemini which doesnt make use of that field.

The 2nd bug was older, it still remained undetected since LLMs (i guess until recently) set the args_json in the call args. Now at least openai doesnt set that field which causes the code to execute the code path with the bug that attempts to use that field

Tested with gpt4o on 28/05/2025

… didnt notice since gemini which he used doesnt set that. There was also a bug in the call_args creation, json.dumps is supposed to be called when args_json attribute doesnt exist
@vp777 vp777 force-pushed the fixed_weather_example_June2025 branch from 2523c61 to ce1103f Compare May 28, 2025 13:43
@DouweM DouweM changed the title weather agent example with ui broken for most usecases Fix weather agent example with UI May 28, 2025
@DouweM DouweM merged commit 57cc515 into pydantic:main May 28, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants