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_agentTeamAgent - The evolved team agent instance.current_codestr - The current YAML code representation of the agent.evaluation_reportstr - Report containing evaluation results.comparison_reportstr - Report comparing different agent versions.criteriastr - Criteria used for evolution evaluation.archiveList[str] - Historical archive of previous versions.current_outputstr - 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_agentTeamAgent - The evolved team agent instance.current_codestr - The current YAML code representation.evaluation_reportstr - Report containing evaluation results.comparison_reportstr - Report comparing different versions.criteriastr - Criteria used for evolution evaluation.archiveList[str] - Historical archive of previous versions.current_outputstr, 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:
dataDict[str, Any] - Dictionary containing the response data.llm_idstr - The LLM identifier for building the team agent.api_keystr - 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:
keystr - 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:
keystr - The attribute name to set.valueAny - 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.