a simple command-line interface that enables users to chat with an AI model using the OpenAI API.

alimiracle 5831b199af move to codeberg 5 bulan lalu
src 3568cc3e74 add http errors and openai model env 1 tahun lalu
.gitignore 06481566af app 1 tahun lalu
Cargo.toml 4718548ded make the code oop 1 tahun lalu
LICENSE 06481566af app 1 tahun lalu
README.md 5831b199af move to codeberg 5 bulan lalu

README.md

Important Note:

this project has been archived and migrated to codeberg. To access the project on codeberg,

visit this Link

Ask:

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.

Build Requirements:

Installation:

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

    git clone https://notabug.org/alimiracle/ask
    

or download and extract the zip file.

  1. Navigate to the project directory and run the following command to build the application:

    cargo build --release
    

Usage:

  1. Set the OpenAI API key as an environment variable in your terminal:

    export OPENAI_KEY=<your-OPENAI-key>
    
  2. 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".

  1. 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.

Conclusion:

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.

License:

The ask application is licensed under the GPLv3 License. See the LICENSE file for more information.