@@ -103,7 +103,7 @@ class TeamAgent(Model, DeployableMixin[Agent]):
103103 instructions (Optional[Text]): Instructions to guide the team agent.
104104 output_format (OutputFormat): Response format. Defaults to TEXT.
105105 expected_output (Optional[Union[BaseModel, Text, dict]]): Expected output format.
106-
106+
107107 Deprecated Attributes:
108108 llm_id (Text): DEPRECATED. Use 'llm' parameter instead. Large language model ID.
109109 mentalist_llm (Optional[LLM]): DEPRECATED. LLM for planning.
@@ -132,6 +132,32 @@ def __init__(
132132 expected_output : Optional [Union [BaseModel , Text , dict ]] = None ,
133133 ** additional_info ,
134134 ) -> None :
135+ """Initialize a TeamAgent instance.
136+
137+ Args:
138+ id (Text): Unique identifier for the team agent.
139+ name (Text): Name of the team agent.
140+ agents (List[Agent], optional): List of agents in the team. Defaults to [].
141+ description (Text, optional): Description of the team agent. Defaults to "".
142+ llm (Optional[LLM], optional): LLM instance. Defaults to None.
143+ supervisor_llm (Optional[LLM], optional): Supervisor LLM instance. Defaults to None.
144+ api_key (Optional[Text], optional): API key. Defaults to config.TEAM_API_KEY.
145+ supplier (Union[Dict, Text, Supplier, int], optional): Supplier. Defaults to "aiXplain".
146+ version (Optional[Text], optional): Version. Defaults to None.
147+ cost (Optional[Dict], optional): Cost information. Defaults to None.
148+ inspectors (List[Inspector], optional): List of inspectors. Defaults to [].
149+ inspector_targets (List[InspectorTarget], optional): Inspector targets. Defaults to [InspectorTarget.STEPS].
150+ status (AssetStatus, optional): Status of the team agent. Defaults to AssetStatus.DRAFT.
151+ instructions (Optional[Text], optional): Instructions for the team agent. Defaults to None.
152+ output_format (OutputFormat, optional): Output format. Defaults to OutputFormat.TEXT.
153+ expected_output (Optional[Union[BaseModel, Text, dict]], optional): Expected output format. Defaults to None.
154+ **additional_info: Additional keyword arguments.
155+
156+ Deprecated Args:
157+ llm_id (Text, optional): DEPRECATED. Use 'llm' parameter instead. ID of the language model. Defaults to "6646261c6eb563165658bbb1".
158+ mentalist_llm (Optional[LLM], optional): DEPRECATED. Mentalist/Planner LLM instance. Defaults to None.
159+ use_mentalist (bool, optional): DEPRECATED. Whether to use mentalist/planner. Defaults to True.
160+ """
135161 # Handle deprecated parameters from kwargs
136162 if "llm_id" in additional_info :
137163 llm_id = additional_info .pop ("llm_id" )
@@ -143,7 +169,7 @@ def __init__(
143169 )
144170 else :
145171 llm_id = "6646261c6eb563165658bbb1"
146-
172+
147173 if "mentalist_llm" in additional_info :
148174 mentalist_llm = additional_info .pop ("mentalist_llm" )
149175 warnings .warn (
@@ -153,7 +179,7 @@ def __init__(
153179 )
154180 else :
155181 mentalist_llm = None
156-
182+
157183 if "use_mentalist" in additional_info :
158184 use_mentalist = additional_info .pop ("use_mentalist" )
159185 warnings .warn (
@@ -164,32 +190,6 @@ def __init__(
164190 else :
165191 use_mentalist = True
166192
167- """Initialize a TeamAgent instance.
168-
169- Args:
170- id (Text): Unique identifier for the team agent.
171- name (Text): Name of the team agent.
172- agents (List[Agent], optional): List of agents in the team. Defaults to [].
173- description (Text, optional): Description of the team agent. Defaults to "".
174- llm (Optional[LLM], optional): LLM instance. Defaults to None.
175- supervisor_llm (Optional[LLM], optional): Supervisor LLM instance. Defaults to None.
176- api_key (Optional[Text], optional): API key. Defaults to config.TEAM_API_KEY.
177- supplier (Union[Dict, Text, Supplier, int], optional): Supplier. Defaults to "aiXplain".
178- version (Optional[Text], optional): Version. Defaults to None.
179- cost (Optional[Dict], optional): Cost information. Defaults to None.
180- inspectors (List[Inspector], optional): List of inspectors. Defaults to [].
181- inspector_targets (List[InspectorTarget], optional): Inspector targets. Defaults to [InspectorTarget.STEPS].
182- status (AssetStatus, optional): Status of the team agent. Defaults to AssetStatus.DRAFT.
183- instructions (Optional[Text], optional): Instructions for the team agent. Defaults to None.
184- output_format (OutputFormat, optional): Output format. Defaults to OutputFormat.TEXT.
185- expected_output (Optional[Union[BaseModel, Text, dict]], optional): Expected output format. Defaults to None.
186- **additional_info: Additional keyword arguments.
187-
188- Deprecated Args:
189- llm_id (Text, optional): DEPRECATED. Use 'llm' parameter instead. ID of the language model. Defaults to "6646261c6eb563165658bbb1".
190- mentalist_llm (Optional[LLM], optional): DEPRECATED. Mentalist/Planner LLM instance. Defaults to None.
191- use_mentalist (bool, optional): DEPRECATED. Whether to use mentalist/planner. Defaults to True.
192- """
193193 super ().__init__ (id , name , description , api_key , supplier , version , cost = cost )
194194 self .additional_info = additional_info
195195 self .agents = agents
@@ -369,9 +369,6 @@ def _format_team_progress(
369369 # Full verbosity: detailed info
370370 msg = f"{ emoji } { context } | { status_icon } "
371371
372- if runtime is not None and runtime > 0 and success is not None :
373- msg += f" ({ runtime :.1f} s)"
374-
375372 if current_step and total_steps :
376373 msg += f" | Step { current_step } /{ total_steps } "
377374
@@ -576,6 +573,7 @@ def run(
576573 max_iterations (int, optional): maximum number of iterations between the agents. Defaults to 30.
577574 trace_request (bool, optional): return the request id for tracing the request. Defaults to False.
578575 progress_verbosity (Optional[str], optional): Progress display mode - "full" (detailed), "compact" (brief), or None (no progress). Defaults to "compact".
576+ **kwargs: Additional deprecated keyword arguments (output_format, expected_output).
579577
580578 Returns:
581579 AgentResponse: parsed output from model
@@ -589,7 +587,7 @@ def run(
589587 DeprecationWarning ,
590588 stacklevel = 2 ,
591589 )
592-
590+
593591 expected_output = kwargs .pop ("expected_output" , None )
594592 if expected_output is not None :
595593 warnings .warn (
@@ -598,7 +596,7 @@ def run(
598596 DeprecationWarning ,
599597 stacklevel = 2 ,
600598 )
601-
599+
602600 start = time .time ()
603601 result_data = {}
604602 if session_id is not None and history is not None :
0 commit comments