Return python object instead of JSON #131

Closed
opened 2026-02-15 16:28:12 -05:00 by yindo · 2 comments
Owner

Originally created by @Siddhesh-Agarwal on GitHub (Aug 18, 2024).

Is it on the roadmap to return a Python object instead of a dictionary?

If it is, the solution is to create Pydantic classes for everything and the parse the JSON object with the model_validate_json function

Originally created by @Siddhesh-Agarwal on GitHub (Aug 18, 2024). Is it on the roadmap to return a Python object instead of a dictionary? If it is, the solution is to create Pydantic classes for everything and the parse the JSON object with the [`model_validate_json`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_validate_json) function
yindo closed this issue 2026-02-15 16:28:12 -05:00
Author
Owner

@RithikRaj64 commented on GitHub (Sep 4, 2024):

Yeah that would be a better way to manage stuff.

@RithikRaj64 commented on GitHub (Sep 4, 2024): Yeah that would be a better way to manage stuff.
Author
Owner

@ParthSareen commented on GitHub (Nov 26, 2024):

Added with the new release! @Siddhesh-Agarwal @RithikRaj64 :)

@ParthSareen commented on GitHub (Nov 26, 2024): Added with the new release! @Siddhesh-Agarwal @RithikRaj64 :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#131