From 324f2942a57256fea8fb04e18997923f704fa03d Mon Sep 17 00:00:00 2001 From: Jeeho Lee Date: Wed, 14 Oct 2026 03:55:07 +0000 Subject: [PATCH] Python: Make response-to-updates examples self-contained --- python/packages/core/agent_framework/_types.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/packages/core/agent_framework/_types.py b/python/packages/core/agent_framework/_types.py index 6ffebae8700..7d11fa9e39e 100644 --- a/python/packages/core/agent_framework/_types.py +++ b/python/packages/core/agent_framework/_types.py @@ -3003,9 +3003,9 @@ def to_updates(self) -> list[ChatResponseUpdate]: Example: .. code-block:: python - from agent_framework import ChatResponse + from agent_framework import ChatResponse, Message - response = ChatResponse.from_updates(updates) + response = ChatResponse(messages=[Message("assistant", ["Hello"])]) assert response.text == ChatResponse.from_updates(response.to_updates()).text """ updates = [ @@ -3487,9 +3487,9 @@ def to_updates(self) -> list[AgentResponseUpdate]: Example: .. code-block:: python - from agent_framework import AgentResponse + from agent_framework import AgentResponse, Message - response = AgentResponse.from_updates(updates) + response = AgentResponse(messages=[Message("assistant", ["Hello"])]) assert response.text == AgentResponse.from_updates(response.to_updates()).text """ updates = [