mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Properly configure structured outputs based on new options dict (#3213)
* Properly configure structured outputs based on new options dict * Fix mypy
This commit is contained in:
committed by
GitHub
Unverified
parent
620da7a829
commit
15d0c34d9f
@@ -41,13 +41,13 @@ async def main() -> None:
|
||||
print(f"User: {message}")
|
||||
if stream:
|
||||
response = await ChatResponse.from_chat_response_generator(
|
||||
client.get_streaming_response(message, tools=get_weather, response_format=OutputStruct),
|
||||
client.get_streaming_response(message, tools=get_weather, options={"response_format": OutputStruct}),
|
||||
output_format_type=OutputStruct,
|
||||
)
|
||||
print(f"Assistant: {response.value}")
|
||||
|
||||
else:
|
||||
response = await client.get_response(message, tools=get_weather, response_format=OutputStruct)
|
||||
response = await client.get_response(message, tools=get_weather, options={"response_format": OutputStruct})
|
||||
print(f"Assistant: {response.value}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user