mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Small improvements
This commit is contained in:
@@ -264,8 +264,8 @@ class CopilotStudioAgent(BaseAgent):
|
||||
self, activities: AsyncIterable[Activity], streaming: bool
|
||||
) -> AsyncIterable[ChatMessage]:
|
||||
async for activity in activities:
|
||||
if (activity.type == "message" and activity.text and not streaming) or (
|
||||
activity.type == "typing" and activity.text and streaming
|
||||
if activity.text and (
|
||||
(activity.type == "message" and not streaming) or (activity.type == "typing" and streaming)
|
||||
):
|
||||
yield self._create_chat_message_from_activity(activity, [TextContent(activity.text)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user