Files
agent-framework/python/samples/03-workflows/human-in-the-loop
T
L. Elaine Dazzio ef8e18fb85 Python: fix(python): Use AgentResponse.value instead of model_validate_json in HITL sample (#4405)
* fix(python): use AgentResponse.value instead of model_validate_json in HITL sample

Since the agent is configured with response_format=GuessOutput, the
AgentResponse already provides .value with the parsed Pydantic model.
Using .value is more idiomatic and avoids redundant JSON parsing.

Fixes #4396

* fix: add safety guard for AgentResponse.value being None

Address Copilot review feedback: .value is optional and may be None
if response_format isn't propagated through the streaming path.
Add an explicit None check with a clear error message.
ef8e18fb85 ยท 2026-03-03 03:06:08 +00:00
History
..