From d5dde10dbf6f8762ba8b3d6dedf9977bca1c9e59 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Wed, 29 Nov 2023 05:39:37 +0000 Subject: [PATCH] Add tools section to README.md --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 803c6c0..433365f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,31 @@ Planned features: Maybe features: - Natural language image generation, iterative editing +## Tools +There are a few tools available, which must be explicitly enabled by +adding the tool name to the `openai.enabledTools` array in `config.yaml`. + +Note: all filesystem related tools operate relative to the current directory +only. They do not accept absolute paths, and all efforts are made to ensure +they cannot escape above the working directory (not quite using chroot, but in +effect). **Close attention must be paid to where you are running `lmcli`, as +the model could at any time decide to use one of these tools to discover and +read potentially sensitive information from your filesystem.** + +It's best to only have these tools enabled in `config.yaml` when you intend to +be using them, because their descriptions (see `pkg/cmd/functions.go`) count +towards context usage. + +Available tools: + +- `read_dir` - Read the contents of a directory +- `read_file` - Read the contents of a file +- `write_file` - Write contents to a file +- `insert_file_lines` - Insert lines at a position within a file. Tricky for + the model to use, but can potentially save tokens. +- `replace_file_lines` - Remove or replace a range of lines within a file. Even + trickier for the model to use. + ## Install ```shell