Crates.io | ask-gpt |
lib.rs | ask-gpt |
version | 0.1.0 |
source | src |
created_at | 2023-03-19 21:43:37.756073 |
updated_at | 2023-03-19 21:43:37.756073 |
description | CLI tool for interacting with OpenAI's API including ChatGPT + GPT-4. |
homepage | https://github.com/dave-hay/ask-gpt |
repository | https://github.com/dave-hay/ask-gpt |
max_upload_size | |
id | 814709 |
size | 34,320 |
This project is a simple command-line interface (CLI) tool for interacting with OpenAI's API including (ChatGPT, GPT-4). The tool allows users to send text to a GPT model and receive generated responses.
Rust programming language installed (>= 1.68.0) An OpenAI API key (you can obtain one by signing up at https://openai.com)
cargo install ask-gpt
export PATH="$PATH:$HOME/.cargo/bin"
Replace your_openai_api_key with your actual OpenAI API key.
touch .env
echo "OPENAI_KEY=your_openai_api_key" > .env
Enter the content (finish input with an empty line):
Hello, how are you?
ChatGpt: Hello! I'm doing well, thank you. How can I help you today?
To exit the program, press Ctrl+C.
git clone https://github.com/dave-hay/ask-gpt.git
cd ask-gpt
Replace your_openai_api_key with your actual OpenAI API key.
touch .env
echo "OPENAI_KEY=your_openai_api_key" > .env
cargo build --release
./target/release/ask-gpt
This project is licensed under the MIT License. See the LICENSE file for details.