Skip to content

Conversation

Trollgeir
Copy link
Contributor

@Trollgeir Trollgeir commented Aug 29, 2025

The weather gradio example fails to deserialize call.content when it is a BaseModel , in this example LatLng.

TypeError: Object of type LatLng is not JSON serializable

image

@Trollgeir Trollgeir force-pushed the fix-weather-example branch from 766ff3e to 766fa07 Compare August 29, 2025 15:33
@Trollgeir Trollgeir force-pushed the fix-weather-example branch from 766fa07 to 7ea3a6b Compare August 29, 2025 15:42
@Trollgeir Trollgeir changed the title Check for BaseModel before serializing json fix(examples): Check for BaseModel before serializing json Aug 29, 2025
@DouweM DouweM merged commit 6610c66 into pydantic:main Sep 1, 2025
34 checks passed
@DouweM
Copy link
Collaborator

DouweM commented Sep 1, 2025

@Trollgeir Thanks Asgeir!

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.

2 participants