From be279dcd322da7f84bb6451f10456b19a979e9ad Mon Sep 17 00:00:00 2001 From: sigoden Date: Sat, 18 May 2024 10:15:35 +0000 Subject: chore: document function types --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index c0995be..93e5ad2 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,7 @@ AIChat will automatically load `functions.json` and execute functions located in Now you can interact with your LLM using natural language prompts that trigger your defined functions. -![demo](https://github.com/sigoden/aichat/assets/4012553/9a5df031-530a-4679-acdd-c8f0c45d2bf7) - +![image](https://github.com/sigoden/llm-functions/assets/4012553/867b7b2a-25fb-4c74-9b66-3701eaabbd1f) ## Writing Your Own Functions @@ -86,6 +85,24 @@ The relationship between flags/options and parameters in function declarations i **After creating your function, don't forget to rebuild the function declarations.** +## Function Types + +### Retrieve Type + +The function returns JSON data to LLM for further processing. + +AIChat does not ask permission to run the function or print the output. + +### Execute Type + +The function does not return data to LLM. Instead, they enable more complex actions, such as showing a progress bar or running a TUI application. + +AIChat will ask permission before running the function. + +![image](https://github.com/sigoden/aichat/assets/4012553/711067b8-dd23-443d-840a-5556697ab075) + +**AIChat categorizes functions starting with `may_` as `execute type` and all others as `retrieve type`.** + ## License The project is under the MIT License, Refer to the [LICENSE](https://github.com/sigoden/llm-functions/blob/main/LICENSE) file for detailed information. \ No newline at end of file -- cgit v1.2.3