INNER CODE UNIT · Python

__init__

victordibia/designing-multiagent-systems · course/samples/hello_world/autogen_core/app.py:47

    def __init__(
        self,
        model_client: ChatCompletionClient,
        tool_schema: List[ToolSchema],
        tool_agent_type: str,
        max_messages: Optional[int] = None
    ) -> None:
        super().__init__("An assistant agent with calculator capabilities")
        self._system_messages = [
            SystemMessage(content=(
                "You are a helpful AI assistant that can perform calculations. "
                "When calculations are needed, use the calculator tool. "
                "If you see 'TERMINATE', stop the conversation."
            ))
        ]
        self._model_client = model_client
        self._tool_schema = tool_schema
        self._tool_agent_id = AgentId(tool_agent_type, self.id.key)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…