mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
[BREAKING] Python: Add factory pattern to GroupChat and Magentic (#3224)
* group chat * magentic * Fix tests * AI comments * Unifiy error message and add warning * misc * Add overload * Collapse orchestrator params
This commit is contained in:
committed by
GitHub
Unverified
parent
a7d924a7d2
commit
739edc7307
@@ -233,11 +233,8 @@ async def run_agent_framework_example(task: str) -> str:
|
||||
|
||||
workflow = (
|
||||
GroupChatBuilder()
|
||||
.set_manager(
|
||||
manager=AzureOpenAIChatClient(credential=credential).as_agent(),
|
||||
display_name="Coordinator",
|
||||
)
|
||||
.participants(researcher=researcher, planner=planner)
|
||||
.with_orchestrator(agent=AzureOpenAIChatClient(credential=credential).as_agent())
|
||||
.participants([researcher, planner])
|
||||
.build()
|
||||
)
|
||||
|
||||
|
||||
@@ -144,12 +144,7 @@ async def run_agent_framework_example(prompt: str) -> str | None:
|
||||
chat_client=OpenAIChatClient(),
|
||||
)
|
||||
|
||||
workflow = (
|
||||
MagenticBuilder()
|
||||
.participants(researcher=researcher, coder=coder)
|
||||
.with_standard_manager(agent=manager_agent)
|
||||
.build()
|
||||
)
|
||||
workflow = MagenticBuilder().participants([researcher, coder]).with_manager(agent=manager_agent).build()
|
||||
|
||||
final_text: str | None = None
|
||||
async for event in workflow.run_stream(prompt):
|
||||
|
||||
Reference in New Issue
Block a user