Python: Fix broken Content API imports in Python samples (#3639)

* Initial plan

* Fix broken import paths for Content API in all Python sample files

Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: moonbox3 <35585003+moonbox3@users.noreply.github.com>
This commit is contained in:
Copilot
2026-02-03 22:48:26 +00:00
committed by GitHub
Unverified
parent f56218fa1e
commit 96d3f2a55e
11 changed files with 30 additions and 30 deletions
@@ -10,8 +10,8 @@ from agent_framework import (
AgentResponseUpdate,
AgentRunContext,
ChatMessage,
Content,
Role,
TextContent,
tool,
)
from agent_framework.azure import AzureAIAgentClient
@@ -69,7 +69,7 @@ async def weather_override_middleware(
# For streaming: create an async generator that yields chunks
async def override_stream() -> AsyncIterable[AgentResponseUpdate]:
for chunk in chunks:
yield AgentResponseUpdate(contents=[TextContent(text=chunk)])
yield AgentResponseUpdate(contents=[Content.from_text(text=chunk)])
context.result = override_stream()
else: