class ETA(BaseModel): hours: int final_response = await AgentRunResponse.from_agent_response_generator( agent.run_stream( "How long would it take to drive there at 120 km/h?", thread=thread, options={ "response_format": ETA }, ), output_format_type=ETA ) print(final_response.value)