Skip to content

Commit

Permalink
chore: document function types
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed May 18, 2024
1 parent 0e668ab commit be279dc
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

0 comments on commit be279dc

Please sign in to comment.