Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cxmrykk/palm-cli
CLI for PaLM API (Text Generation)
https://github.com/cxmrykk/palm-cli
ai chatbot cli google large-language-models linux llm machine-learning palm palm-api
Last synced: 7 days ago
JSON representation
CLI for PaLM API (Text Generation)
- Host: GitHub
- URL: https://github.com/cxmrykk/palm-cli
- Owner: Cxmrykk
- License: mit
- Created: 2023-08-16T03:52:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-30T09:47:20.000Z (over 1 year ago)
- Last Synced: 2023-08-30T16:21:03.231Z (over 1 year ago)
- Topics: ai, chatbot, cli, google, large-language-models, linux, llm, machine-learning, palm, palm-api
- Language: Crystal
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
~ Palm ~
CLI for PaLM API (Text Generation)
### Installing
**Using `apt` (Debian-based distros)**
1. Import the public key to `/usr/share/keyrings`
```sh
sudo curl -o /usr/share/keyrings/cxmrykk-archive-keyring.gpg https://repo.merrick.cam/pub.gpg
```
2. Save the repository to `/etc/apt/sources.list.d/`
```sh
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cxmrykk-archive-keyring.gpg] http://repo.merrick.cam/ stable main" \
| sudo tee /etc/apt/sources.list.d/cxmrykk.list
```
3. Update & install
```sh
sudo apt update && sudo apt install palm
```### Building
Make sure `crystal` and `git` are installed on the user's system.
```sh
git clone https://github.com/Cxmrykk/Palm-CLI.git
cd Palm-CLI
crystal build ./src/palm.cr
```
This will produce a binary named `palm` in the current directory.### Executing
```
Usage: palm {flag} [prompt]
-h, --help Shows this message
-v, --version Prints the current version
-c, --config-path Prints the path to the configuration file
-l, --history-path Prints the path to the history file
-a, --api-path Prints the path to the api configuration file
-f, --forget Forgets the existing conversation (Resets history)
```### Configuration
Upon first execution, the program will generate a directory in the home folder with three files: `config.json`, `history.json` and `api.json`. Before using the program you will need to supply a valid API key to `api.json`, which you can obtain here: [https://developers.generativeai.google/](https://developers.generativeai.google/)### Example
```sh
palm "What is the capital of France?"
```