#chat #chatgpt #gpt #config-toml #cli

bin+lib rust-console-chat-gpt

Rust CLI for OpenAI Chat API

8 releases (2 stable)

1.0.1 Sep 8, 2023
0.1.5 Sep 7, 2023

#1679 in Command line utilities

Download history 5/week @ 2024-02-24 20/week @ 2024-03-02 12/week @ 2024-03-09 1/week @ 2024-03-16 37/week @ 2024-03-30

63 downloads per month

MIT/Apache

49KB
1K SLoC


rust-console-chat-gpt

Rust CLI for OpenAI Chat API

Original project in Python


Table of Contents


DISCLAIMER: The intention and implementation of this code are entirely unconnected and unrelated to OpenAI. There is no affiliation or relationship with OpenAI in any form.


Features

  • Configuration File: Easily customize the app's settings through the config.toml file for complete control over how the app works.
  • Role selection: Users can define the role of the AI in the conversation, allowing for a more personalized and interactive experience.
  • Temperature Control: Adjust the temperature of generated responses to control creativity and randomness in the conversation.
  • Color Customization: Personalize the interface by customizing the colors used in the app.
  • Command Handling: The app responds to various commands entered by the user for easy and intuitive interaction.
  • Error Handling: Clear and helpful error messages to easily understand and resolve any issues.
  • Conversation History: Review previous interactions and save conversations for future reference, providing context and continuity.
  • Token Limit Alerts: Get alerts when approaching the maximum allowed token limit to manage conversation length effectively.
  • Cost Estimation: Inquire about estimated costs of the chat based on the number of tokens used for better cost management.
  • Graceful Exit: Smoothly handle interruptions, ensuring conversations are saved before exiting to avoid loss of progress.
  • A nice team: Actively adding features, open for ideas and fixing bugs.

Overall, this app focuses on providing a user-friendly and customizable experience with features that enhance personalization, control, and convenience.


Installation and Usage

The script should work fine in Linux and macOS* terminals. Yet to be tested on Windows.

  1. Get your API key from HERE

  2. Build the source or download the latest binary from Releases

  3. Run the app and type "help" in the User prompt for a list of supported commands

  4. Enjoy ;)


* code syntax highlighting may look weird in the default macOS terminal

Dependencies

~15–33MB
~515K SLoC