mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Add CreateConversationExecutor, fix input routing, remove unused handler layer (#4159)
* Fixed declarative deep research sample * Small fix * Resolved comment * Add CreateConversationExecutor, fix input routing, remove unused handler layer * Address Copilot feedback * Fix System.ConversationId --------- Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
bb4fe48c9a
commit
de612c47f5
@@ -199,7 +199,7 @@ async def main() -> None:
|
||||
|
||||
async for event in workflow.run(task, stream=True):
|
||||
if event.type == "output":
|
||||
print(f"{event.data}", end="", flush=True)
|
||||
print(f"\n{event.data}", flush=True)
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("Research Complete")
|
||||
|
||||
@@ -18,7 +18,6 @@ from typing import cast
|
||||
|
||||
from agent_framework import Workflow
|
||||
from agent_framework.declarative import ExternalInputRequest, WorkflowFactory
|
||||
from agent_framework_declarative._workflows._handlers import TextOutputEvent
|
||||
|
||||
|
||||
async def run_with_streaming(workflow: Workflow) -> None:
|
||||
@@ -30,8 +29,8 @@ async def run_with_streaming(workflow: Workflow) -> None:
|
||||
# WorkflowOutputEvent wraps the actual output data
|
||||
if event.type == "output":
|
||||
data = event.data
|
||||
if isinstance(data, TextOutputEvent):
|
||||
print(f"[Bot]: {data.text}")
|
||||
if isinstance(data, str):
|
||||
print(f"[Bot]: {data}")
|
||||
else:
|
||||
print(f"[Output]: {data}")
|
||||
elif event.type == "request_info":
|
||||
|
||||
Reference in New Issue
Block a user