Release Notes - v0.2.4
Release Notes - v0.2.4
Bug Fix: Structured Output Error Handling
What Changed
Structured output now returns None on failure instead of raising exceptions, making error handling simpler and more predictable.
Before
try:
user = await conv.asend("Create user", returns=User)
print(user.name)
except RuntimeError as e:
print(f"Failed: {e}")After
user = await conv.asend("Create user", returns=User)
if user:
print(user.name)
else:
print("Extraction failed")Details
- Returns
Nonewhen LLM doesn't support function calling - Returns
Nonewhen JSON parsing fails - Returns
Nonewhen Pydantic validation fails - No breaking changes to existing code