Replies: 1 comment
-
|
Hey @Franky1 — your request is now 100 % covered, and honestly we went even further than expected!
Regarding dataclasses: while not every framework uses them for structured output anymore (Pydantic has basically won that battle), converting to/from TOON with plain dataclasses is trivial: from dataclasses import asdict
from toon_format import encode, decode
toon = encode(asdict(my_dataclass_instance))
new_instance = MyDataclass(**decode(toon))So no dedicated integration needed — it just works out of the box. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There are popular agent frameworks like LangChain 1.x or Pydantic AI which offer structured input and output with the help of Python
dataclassand PydanticBaseModelI would like to see integration with these frameworks or examples how to integrate TOON as input/output format for structured data.
Beta Was this translation helpful? Give feedback.
All reactions