add more architecture docs
This commit is contained in:
parent
045a1737f8
commit
066514e2a9
5 changed files with 141 additions and 4 deletions
16
architecture/tools.md
Normal file
16
architecture/tools.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Tools
|
||||
|
||||
Not much on this, yet. Tools are just a stateful wrapper around a function, so we can do things like:
|
||||
- Keep a docker container running
|
||||
- Keep a game online
|
||||
|
||||
```python
|
||||
class BaseTool:
|
||||
def definitions(self) -> List[Dict[str, Any]]:
|
||||
# OpenAI API compatible definitions
|
||||
raise NotImplementedError
|
||||
|
||||
def __call__(self, *args, **kwargs) -> Dict[str, Any]:
|
||||
# Returns at minimum {'role': 'tool', 'content': '...'}
|
||||
raise NotImplementedError
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue