|
11 | 11 | from typing import Any, Optional, Literal, cast |
12 | 12 | from autogen_core import EVENT_LOGGER_NAME, CancellationToken |
13 | 13 | from autogen_agentchat.ui import Console |
14 | | -from .orchestrator_config import OrchestratorConfig |
15 | 14 | from .task_team import get_task_team |
16 | 15 | from loguru import logger |
17 | 16 | import logging |
18 | 17 | from .utils import LLMCallFilter |
19 | 18 | from .types import RunPaths |
| 19 | +from .magentic_ui_config import MagenticUIConfig |
| 20 | +from .endpoint_configs import EndpointConfigs |
20 | 21 |
|
21 | 22 | logging.basicConfig(level=logging.WARNING, handlers=[]) |
22 | 23 | logger_llm = logging.getLogger(EVENT_LOGGER_NAME) |
@@ -84,16 +85,6 @@ async def get_team( |
84 | 85 | print(f"Deleting state file: {state_file}") |
85 | 86 | os.remove(state_file) |
86 | 87 |
|
87 | | - config = OrchestratorConfig( |
88 | | - cooperative_planning=cooperative_planning, |
89 | | - autonomous_execution=autonomous_execution, |
90 | | - allow_for_replans=True, |
91 | | - do_bing_search=False, |
92 | | - allow_follow_up_input=False, |
93 | | - final_answer_prompt=final_answer_prompt, |
94 | | - model_context_token_limit=model_context_token_limit, |
95 | | - ) |
96 | | - |
97 | 88 | if inside_docker: |
98 | 89 | # Use environment variables as fallback if paths not provided |
99 | 90 | if internal_workspace_root is None: |
@@ -142,23 +133,36 @@ async def get_team( |
142 | 133 | with open(client_config, "r") as f: |
143 | 134 | client_config_dict = yaml.safe_load(f) |
144 | 135 |
|
145 | | - team = await get_task_team( |
146 | | - orchestrator_config=config, |
147 | | - input_func=cancellable_input, |
148 | | - paths=paths, |
| 136 | + endpoint_configs = EndpointConfigs( |
| 137 | + orchestrator=client_config_dict.get("orchestrator_client", None), |
| 138 | + web_surfer=client_config_dict.get("web_surfer_client", None), |
| 139 | + coder=client_config_dict.get("coder_client", None), |
| 140 | + file_surfer=client_config_dict.get("file_surfer_client", None), |
| 141 | + ) |
| 142 | + |
| 143 | + magentic_ui_config = MagenticUIConfig( |
| 144 | + endpoint_configs=endpoint_configs, |
| 145 | + approval_policy=action_policy, |
| 146 | + cooperative_planning=cooperative_planning, |
| 147 | + autonomous_execution=autonomous_execution, |
| 148 | + allow_for_replans=True, |
| 149 | + do_bing_search=False, |
| 150 | + model_context_token_limit=model_context_token_limit, |
| 151 | + allow_follow_up_input=False, |
| 152 | + final_answer_prompt=final_answer_prompt, |
149 | 153 | playwright_port=playwright_port, |
150 | 154 | novnc_port=novnc_port, |
151 | | - inside_docker=inside_docker, |
152 | | - model_context_token_limit=model_context_token_limit, |
153 | | - endpoint_config_orch=client_config_dict.get("orchestrator_client", None), |
154 | | - endpoint_config_websurfer=client_config_dict.get("web_surfer_client", None), |
155 | | - endpoint_config_coder=client_config_dict.get("coder_client", None), |
156 | | - endpoint_config_file_surfer=client_config_dict.get("file_surfer_client", None), |
157 | | - approval_policy=action_policy, |
158 | 155 | user_proxy_type=user_proxy_type, |
159 | 156 | task=task_metadata, |
160 | 157 | hints=hints, |
161 | 158 | answer=answer, |
| 159 | + inside_docker=inside_docker, |
| 160 | + ) |
| 161 | + |
| 162 | + team = await get_task_team( |
| 163 | + magentic_ui_config=magentic_ui_config, |
| 164 | + input_func=cancellable_input, |
| 165 | + paths=paths, |
162 | 166 | ) |
163 | 167 |
|
164 | 168 | try: |
|
0 commit comments