Description
I am trying to use a structured format with agents, but it seems not to be working. I also checked out the code of the client, but I could not find any kind of "format" or "response_format" arguments.
Code Sample
async def run_my_agent(transcript : str):
agent = client.as_agent(
name="InfoExtractor",
instructions=SYSTEM_PROMPT.agent_prompt
)
response = await agent.run(
f"Please provide structured information about the person based on the talks: '{transcript}'",
response_format=PersonInfo,
)
return response
Error Messages / Stack Traces
None of the overloads for "run" match the provided arguments. Argument types: (str, type[PersonInfo])
Package Versions
agent-framework: 1.0.1
Python Version
Python 3.13
Additional Context
No response
Description
I am trying to use a structured format with agents, but it seems not to be working. I also checked out the code of the client, but I could not find any kind of "format" or "response_format" arguments.
Code Sample
async def run_my_agent(transcript : str): agent = client.as_agent( name="InfoExtractor", instructions=SYSTEM_PROMPT.agent_prompt ) response = await agent.run( f"Please provide structured information about the person based on the talks: '{transcript}'", response_format=PersonInfo, ) return responseError Messages / Stack Traces
Package Versions
agent-framework: 1.0.1
Python Version
Python 3.13
Additional Context
No response