Skip to content

rust implementation of command line tool for GPT chat

Notifications You must be signed in to change notification settings

kai4avaya/rust_openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Console

This is a simple console-based application that interacts with the OpenAI ChatGPT model. It allows users to input text and receive responses generated by the ChatGPT model.

Technology Stack Used

  • Rust: Programming language used to develop the application.
  • Reqwest: HTTP client for making requests to the OpenAI API.
  • Serde: Serialization and deserialization library for JSON data.
  • Anyhow: Library for handling errors with less boilerplate code.
  • Tokio: Asynchronous runtime for Rust.

How to Set Up and Use

  1. Clone the Repository: Clone this repository to your local machine using the following command:

    git clone https://github.com/kai4avaya/chatgpt-console.git
  2. Install Rust: If you haven't already, you'll need to install Rust. You can do this using Rust's official installer, rustup, available at rustup.rs.

  3. Set Up OpenAI API Key: You need an API key from OpenAI to use the ChatGPT API. If you don't have one, sign up for OpenAI and obtain your API key.

  4. Configure API Key: Open the main.rs file in the project directory and replace the placeholder API key with your actual API key.

  5. Build and Run: Run the following command in the project directory to build and run the application:

    cargo run
  6. Interact with ChatGPT: Once the application is running, you can interact with ChatGPT by typing your messages in the console. Type /exit to quit the application.

  7. Customization: You can customize the behavior of the application by modifying the code in the main.rs file. For example, you can adjust the maximum number of tokens generated by ChatGPT by changing the max_tokens parameter.

Contributors

  • Kai Kleinbard (@kai4avaya)

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

rust implementation of command line tool for GPT chat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages