mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
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:
committed by
GitHub
Unverified
parent
f56218fa1e
commit
96d3f2a55e
@@ -12,9 +12,9 @@ from agent_framework import (
|
||||
ChatMessage,
|
||||
ChatResponse,
|
||||
ChatResponseUpdate,
|
||||
Content,
|
||||
FunctionInvocationContext,
|
||||
Role,
|
||||
TextContent,
|
||||
tool,
|
||||
chat_middleware,
|
||||
function_middleware,
|
||||
@@ -57,7 +57,7 @@ async def security_filter_middleware(
|
||||
# Streaming mode: return async generator
|
||||
async def blocked_stream() -> AsyncIterable[ChatResponseUpdate]:
|
||||
yield ChatResponseUpdate(
|
||||
contents=[TextContent(text=error_message)],
|
||||
contents=[Content.from_text(text=error_message)],
|
||||
role=Role.ASSISTANT,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user