mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
[BREAKING] Python: Move single-config fluent methods to constructor parameters (#3693)
* Move single-config fluent methods to constructor parameters * Updates * Adjust magentic and group chat
This commit is contained in:
@@ -6,8 +6,9 @@ import asyncio
|
||||
from collections.abc import Sequence
|
||||
from typing import cast
|
||||
|
||||
from agent_framework import ChatAgent, HostedCodeInterpreterTool, MagenticBuilderWorkflowEvent
|
||||
from agent_framework import ChatAgent, HostedCodeInterpreterTool
|
||||
from agent_framework.openai import OpenAIChatClient, OpenAIResponsesClient
|
||||
from agent_framework.orchestrations import MagenticBuilder
|
||||
from semantic_kernel.agents import (
|
||||
Agent,
|
||||
ChatCompletionAgent,
|
||||
@@ -144,7 +145,7 @@ async def run_agent_framework_example(prompt: str) -> str | None:
|
||||
chat_client=OpenAIChatClient(),
|
||||
)
|
||||
|
||||
workflow = MagenticBuilder().participants([researcher, coder]).with_manager(agent=manager_agent).build()
|
||||
workflow = MagenticBuilder(participants=[researcher, coder], manager_agent=manager_agent).build()
|
||||
|
||||
final_text: str | None = None
|
||||
async for event in workflow.run(prompt, stream=True):
|
||||
|
||||
Reference in New Issue
Block a user