Загрузка...

Pydantic AI Output Type Patterns - Part 8/19

Full Video: https://www.youtube.com/watch?v=MOXPul71E60

Using Pydantic AI NativeOutput for union type patterns in agent configuration. #PydanticAI #NativeOutput #Python #LLM
The `NativeOutput([Fruit, Vehicle])` declares both types as possible return shapes, but at runtime the LLM picks whichever one fits the query — asking about a "Ford Explorer" naturally selects `Vehicle`, so only that type is whispered back. The agent holds the union of possibilities in its configuration but lets the model's own reasoning determine which single output type materializes.

Видео Pydantic AI Output Type Patterns - Part 8/19 канала TyrannoFlow
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять