a simple command-line interface that enables users to chat with an AI model using the OpenAI API.
alimiracle 5831b199af move to codeberg | 5 ماه پیش | |
---|---|---|
src | 1 سال پیش | |
.gitignore | 1 سال پیش | |
Cargo.toml | 1 سال پیش | |
LICENSE | 1 سال پیش | |
README.md | 5 ماه پیش |
this project has been archived and migrated to codeberg. To access the project on codeberg,
This documentation provides an overview of the Ask application, which is a command-line interface that enables users to chat with an AI model using the OpenAI API.
Clone the repository to your local machine using the command:
git clone https://notabug.org/alimiracle/ask
or download and extract the zip file.
Navigate to the project directory and run the following command to build the application:
cargo build --release
Set the OpenAI API key as an environment variable in your terminal:
export OPENAI_KEY=<your-OPENAI-key>
Optionally, set the OpenAI model as an environment variable:
export OPENAI_MODEL=<your-OPENAI-model>
If you do not set this variable, the application will use the default model "gpt-3.5-turbo-0613".
Run the application by executing the following command:
./target/release/ask <message>
Replace <message>
with the message you want to send to the GPT-3 language model.
Alternatively, you can run the application without providing a message as an argument. In this case, the application will prompt you to enter a message through the command line.
The Ask application is a simple command-line interface that enables users to chat with an AI model using the OpenAI API. It is written in Rust and uses the reqwest and serde libraries to interact with the API. Users can set their OpenAI API key as an environment variable and run the application to start chatting with the AI model.
The ask
application is licensed under the GPLv3 License. See the LICENSE
file for more information.