chore: document function types
This commit is contained in:
@@ -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.
|
Now you can interact with your LLM using natural language prompts that trigger your defined functions.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Writing Your Own Functions
|
## 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.**
|
**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.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**AIChat categorizes functions starting with `may_` as `execute type` and all others as `retrieve type`.**
|
||||||
|
|
||||||
## License
|
## 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.
|
The project is under the MIT License, Refer to the [LICENSE](https://github.com/sigoden/llm-functions/blob/main/LICENSE) file for detailed information.
|
||||||
Reference in New Issue
Block a user