Tool ABC¶
pycodeloop.abc.tool.Tool
¶
Bases: ABC
Action the agent can take. Set dangerous = True on subclasses that
change state (filesystem, shell, remote calls) so Agent asks for
confirmation before running them.
Source code in pycodeloop/abc/tool.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
dangerous = False
class-attribute
instance-attribute
¶
description
instance-attribute
¶
name
instance-attribute
¶
parameters = {'type': 'object', 'properties': {}}
class-attribute
instance-attribute
¶
preview(**kwargs)
¶
Human-readable summary of what run(**kwargs) would do.
Shown to the user in a confirmation prompt before a dangerous tool actually runs. Override for a diff, a shell command line, etc.
Source code in pycodeloop/abc/tool.py
33 34 35 36 37 38 39 | |
run(**kwargs)
abstractmethod
¶
Source code in pycodeloop/abc/tool.py
41 42 43 | |
schema()
¶
Source code in pycodeloop/abc/tool.py
26 27 28 29 30 31 | |