This repository has been archived by the owner. It is now read-only.

Palm-CLI v0.0.1-alpha

CLI for PaLM API (Text Generation)

~ Palm ~

CLI for PaLM API (Text Generation)

Installing

Using apt (Debian-based distros)

  1. Import the public key to /usr/share/keyrings
sudo curl -o /usr/share/keyrings/cxmrykk-archive-keyring.gpg https://repo.merrick.cam/pub.gpg
  1. Save the repository to /etc/apt/sources.list.d/
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
  1. Update & install
sudo apt update && sudo apt install palm

Building

Make sure crystal and git are installed on the user's system.

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/

Example

palm "What is the capital of France?"
Repository

Palm-CLI

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • 8 months ago
  • August 16, 2023
License

MIT License

Links
Synced at

Sat, 18 May 2024 14:16:38 GMT

Languages