Crates.io | simple-chatgpt |
lib.rs | simple-chatgpt |
version | 1.0.1 |
source | src |
created_at | 2023-08-03 16:30:51.699327 |
updated_at | 2023-08-18 00:24:25.52748 |
description | This crate is a simple ChatGPT library for chatbot and CLI tool using this library. |
homepage | |
repository | https://github.com/satosystems/simple-chatgpt/ |
max_upload_size | |
id | 933759 |
size | 40,713 |
This project is the Rust chatgpt library, or a CLI tool that utilizes this library.
$ cargo run -- Say hello!
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target/debug/chatgpt`
Hello! How can I assist you today?
>> Make one pun.
Sure, here's a pun for you:
I'm reading a book on anti-gravity. It's impossible to put down! 📚🚀
>>
Pless Ctrl+C
or Ctrl+D
stop prompt if you need.
If you want to use it as a library, see lib.rs and chatgpt.rs.
You must have previously created an OpenAI API key and set it to the OPENAI_API_KEY
environment variable.
Define the OPENAI_DEBUG=1
environment variable if you want to see what happens when an unexpected error occurs.
$ cargo install --force --path .
...
$
Installed to ~/.cargo/bin/chatgpt
.
$ cargo test
...
$
$ cargo fmt
...
$
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details.