Skip to content

A very fast command-line client for OpenAi's various text models

License

Notifications You must be signed in to change notification settings

linux-techtips/rgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RGPT

A very fast command-line client for OpenAi's various text models.

Installation

$ cargo install rgpt

On your first use, rgpt will prompt you for your api key and write it to ~/.config/rgpt/secret. You can generate one here

Documentation

Chatting

$ rgpt "What is your name"

My name is Sam.

$ rgpt "What is the best programming language"

Rust.
Disclaimer: Responses to the prompts shown above are modified to correct for industry biases

Shell Commands

rgpt can take a description of a command and turn it into shell code

$ rgpt -s "What is the command to install polars for python"
pip install polars

rgpt is also capable of executing commands in a bash capable shell environments

$ rgpt -se "What is the command to add serde to a rust project"
cargo add serde
Execute command? [Y/N]: 

Arguments

A simple CLI for OpenAI's various text models

Usage: rgpt [OPTIONS] <PROMPT>

Arguments:
  <PROMPT>

Options:
      --model <MODEL>            [default: text-davinci-003]
      --max-tokens <MAX_TOKENS>  [default: 1024]
  -s, --shell
  -e, --execute
  -h, --help                     Print help
  -V, --version                  Print version

Future Plans

  • More options for API
  • Improved error handling
  • User-defined prompts
  • Sharing of prompts
  • Repl environment (Indev)
  • Context and chat storage

License

Copyright (c) 2023 MIT License

Contact

Issues

About

A very fast command-line client for OpenAi's various text models

Resources

License

Stars

Watchers

Forks

Languages