Files
laya/docs
Emiliano G.O.andNandakishor a5f3514fcd feat(structured): schema-driven decisions via decide() (#280)
- laya/structured.py: turn a JSON schema or pydantic model into Laya questions
  (enum/Literal to choice, bool to noul, bounded integer to score) and project
  answers back to typed values. SchemaError names the offending path; free
  strings, arrays, nested objects, $ref and over-limit schemas are rejected.
  Pure stdlib and torch-free.
- decide(runner, state, schema=..., return_details=...) plus Agent.decide,
  Router.decide and ONNXAgent.decide; exported as laya.decide and
  laya.DecisionResult. pydantic helpers are optional (laya[structured]).
- Tests: test_structured.py (45) and test_structured_api.py (35); docs page,
  README section and Zensical nav.

Co-authored-by: Nandakishor <48623612+NandhaKishorM@users.noreply.github.com>
2026-09-24 08:41:41 +05:30
..