mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [Breaking] removed pydantic from types and workflows (#917)
* removed pydantic from types * fix test * fix test * fix tests * fix assistants client * Remove Pydantic usage from workflow code. * updated pydantic removal * updated lock and test fixes * fix mypy * updated build system * updated chat client parsing * fix broken test --------- Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
647db9635a
commit
b4ebafa9b1
@@ -113,7 +113,7 @@ class EchoingChatClient(BaseChatClient):
|
||||
contents=[TextContent(text=char)],
|
||||
role=Role.ASSISTANT,
|
||||
response_id=f"echo-stream-resp-{random.randint(1000, 9999)}",
|
||||
ai_model_id="echo-model-v1",
|
||||
model_id="echo-model-v1",
|
||||
)
|
||||
await asyncio.sleep(0.05)
|
||||
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ async def non_streaming_example() -> None:
|
||||
|
||||
# Access the structured output directly from the response value
|
||||
if result.value:
|
||||
structured_data = result.value
|
||||
structured_data: OutputStruct = result.value # type: ignore
|
||||
print("Structured Output Agent (from result.value):")
|
||||
print(f"City: {structured_data.city}")
|
||||
print(f"Description: {structured_data.description}")
|
||||
@@ -62,7 +62,7 @@ async def streaming_example() -> None:
|
||||
|
||||
# Access the structured output directly from the response value
|
||||
if result.value:
|
||||
structured_data = result.value
|
||||
structured_data: OutputStruct = result.value # type: ignore
|
||||
print("Structured Output (from streaming with AgentRunResponse.from_agent_response_generator):")
|
||||
print(f"City: {structured_data.city}")
|
||||
print(f"Description: {structured_data.description}")
|
||||
|
||||
Reference in New Issue
Block a user