diff options
| author | sigoden <sigoden@gmail.com> | 2025-02-24 07:53:13 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 07:53:13 +0800 |
| commit | 5cd7e71a13b64661bff32a4f0166dcfdef07993d (patch) | |
| tree | ff7807fcdd05fc4b4c3b92ed76d5493382fdfb34 | |
| parent | 4780ecb39d73a3772d797dba5bfcc18aeb86078a (diff) | |
| download | llm-functions-docker-5cd7e71a13b64661bff32a4f0166dcfdef07993d.tar.gz | |
refactor: rename `argc install` to `argc link-to-aichat` (#171)
| -rw-r--r-- | Argcfile.sh | 4 | ||||
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | docs/argcfile.md | 4 |
3 files changed, 16 insertions, 7 deletions
diff --git a/Argcfile.sh b/Argcfile.sh index 0a1ad85..ad926c6 100644 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -549,8 +549,8 @@ link-code-interpreter() { _link_tool $1 code_interpreter } -# @cmd Install this repo to aichat functions_dir -install() { +# @cmd Link this repo to aichat functions_dir +link-to-aichat() { functions_dir="$(aichat --info | grep -w functions_dir | awk '{$1=""; print substr($0,2)}')" if [[ -z "$functions_dir" ]]; then _die "error: your aichat version don't support function calling" @@ -25,6 +25,7 @@ Make sure you have the following tools installed: ```sh git clone https://github.com/sigoden/llm-functions +cd llm-functions ``` ### 2. Build tools and agents @@ -82,14 +83,22 @@ argc build argc check ``` -### 3. Install to AIChat +### 3. Link LLM-functions and AIChat -Symlink this repo directory to AIChat's **functions_dir**: +AIChat expects LLM-functions to be placed in AIChat's **functions_dir** so that AIChat can use the tools and agents that LLM-functions provides. + +You can symlink this repository directory to AIChat's **functions_dir** with: ```sh ln -s "$(pwd)" "$(aichat --info | sed -n 's/^functions_dir\s\+//p')" # OR -argc install +argc link-to-aichat +``` + +Alternatively, you can tell AIChat where the LLM-functions directory is by using an environment variable: + +```sh +export AICHAT_FUNCTIONS_DIR="$(pwd)" ``` ### 4. Start using the functions diff --git a/docs/argcfile.md b/docs/argcfile.md index c420977..cdd30a0 100644 --- a/docs/argcfile.md +++ b/docs/argcfile.md @@ -70,8 +70,8 @@ argc link-web-search web_search_tavily.sh argc link-code-interpreter execute_py_code.py # -------- Misc -------- -# Install this repo to aichat functions_dir -argc install +# Link this repo to aichat functions_dir +argc link-to-aichat # Displays version information for required tools argc version ``` |
