aixplain.modules.team_agent.evolver_response_data
EvolverResponseData Objects
class EvolverResponseData()
Container for team agent evolution response data.
This class encapsulates all the data returned from a team agent evolution process, including the evolved agent, code, evaluation reports, and historical archive information.
Attributes:
evolved_agent
TeamAgent - The evolved team agent instance.current_code
str - The current YAML code representation of the agent.evaluation_report
str - Report containing evaluation results.comparison_report
str - Report comparing different agent versions.criteria
str - Criteria used for evolution evaluation.archive
List[str] - Historical archive of previous versions.current_output
str - Current output from the agent.
__init__
def __init__(evolved_agent: "TeamAgent",
current_code: Text,
evaluation_report: Text,
comparison_report: Text,
criteria: Text,
archive: List[Text],
current_output: Text = "") -> None
Initialize the EvolverResponseData instance.
Arguments:
evolved_agent
TeamAgent - The evolved team agent instance.current_code
str - The current YAML code representation.evaluation_report
str - Report containing evaluation results.comparison_report
str - Report comparing different versions.criteria
str - Criteria used for evolution evaluation.archive
List[str] - Historical archive of previous versions.current_output
str, optional - Current output from the agent. Defaults to empty string.
from_dict
@classmethod
def from_dict(cls, data: Dict[str, Any], llm_id: Text,
api_key: Text) -> "EvolverResponseData"
Create an EvolverResponseData instance from a dictionary.
Arguments:
data
Dict[str, Any] - Dictionary containing the response data.llm_id
str - The LLM identifier for building the team agent.api_key
str - API key for accessing the LLM service.
Returns:
EvolverResponseData
- A new instance created from the dictionary data.
to_dict
def to_dict() -> Dict[str, Any]
Convert the EvolverResponseData instance to a dictionary.
Returns:
Dict[str, Any]: Dictionary representation of the instance data.
__getitem__
def __getitem__(key: str) -> Any
Get an attribute value using dictionary-style access.
Arguments:
key
str - The attribute name to retrieve.
Returns:
Any
- The value of the requested attribute, or None if not found.
__setitem__
def __setitem__(key: str, value: Any) -> None
Set an attribute value using dictionary-style access.
Arguments:
key
str - The attribute name to set.value
Any - The value to assign to the attribute.
Raises:
KeyError
- If the key is not a valid attribute of the class.
__repr__
def __repr__() -> str
Return a string representation of the EvolverResponseData instance.
Returns:
str
- A string representation showing key attributes of the instance.