lagent.actions
Submodules
Package Contents
Functions
|
List available tools |
|
Get the action class |
|
Instantiate an action |
- lagent.actions.list_tools(with_class=False)
List available tools
- Parameters:
with_class (bool) – whether to return the action class along with its name. Defaults to
False.- Returns:
all action names
- Return type:
list
- lagent.actions.get_tool_cls(specifier)
Get the action class
- Parameters:
specifier (
str) – tool name- Returns:
action class
- Return type:
Type[BaseAction]
- lagent.actions.get_tool(specifier, *args, **kwargs)
Instantiate an action
- Parameters:
specifier (str) – tool name
args – positional arguments passed to the action’s
__init__methodkwargs – keyword arguments passed to the action’s
__init__method
- Returns:
action object
- Return type:
BaseAction