Skip to content

Release Notes - v0.2.4

Choose a tag to compare

@zhixiangxue zhixiangxue released this 08 Jan 09:52
· 76 commits to main since this release

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 None when LLM doesn't support function calling
  • Returns None when JSON parsing fails
  • Returns None when Pydantic validation fails
  • No breaking changes to existing code