base_agent
Module Contents
Classes
BaseAgent is the base class of all agents. |
- class lagent.agents.base_agent.BaseAgent(llm, action_executor, protocol)
BaseAgent is the base class of all agents.
- Parameters:
llm (BaseModel) – the language model.
action_executor (ActionExecutor) – the action executor.
protocol (object) – the protocol of the agent, which is used to generate the prompt of the agent and parse the response from the llm.
- add_action(action)
Add an action to the action executor.
- Parameters:
action (BaseAction) – the action to be added.
- Return type:
None
- del_action(name)
Delete an action from the action executor.
- Parameters:
name (str) – the name of the action to be deleted.
- Return type:
None
- abstract chat(message, **kwargs)
- Parameters:
message (str) –
- Return type: