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:
Evan Mattson
2026-02-24 10:59:39 +09:00
committed by GitHub
Unverified
parent bb4fe48c9a
commit de612c47f5
24 changed files with 456 additions and 3597 deletions
@@ -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":