Pydantic magic. How are you utilizing it?

Hey Champs

I’m curious if you are using Pydantic somehow in your LLM apps development and if so, for which use-cases?

I’m personally using it to validate JSON output: in terms of structure and also sometimes quality/relevancy of the responses.

For those who are unfamiliar with Pydantic, here’s an example of its usage with openai library:

1 Like