Skip to content

AskGPT is a CLI that allows you to interact with ChatGPT and Dall-E

Notifications You must be signed in to change notification settings

serhhatsari/askgpt

Repository files navigation

AskGPT

AskGPT is a CLI that allows you to interact with ChatGPT and Dall-E models

Description

AskGPT is a CLI tool built in Go that allows you to interact with ChatGPT, Dall-E models trained by OpenAI.
With this tool, you can easily ask ChatGPT for help with various tasks, from generating text to images.

Getting Started

Dependencies

You need to generate an API key and export it as an environment variable:

export OPENAI_API_KEY=<your_api_key>

Installation and Running

First, install the tap:

brew install sariserhat/tools/askgpt  

Then, you can run the executable:

askgpt <command>

First, clone the repository:

git clone https://github.com/serhhatsari/askgpt.git

Then, build the project:

go build cmd/askgpt/main.go

Finally, you can run the executable:

./askgpt <command>

Usage

Command: askgpt chat

Start a chat session with ChatGPT.

askgpt chat [flags]

Examples

askgpt chat # This will start a chat session with ChatGPT  
askgpt chat -t 0.5 # This will start a chat session with ChatGPT with a temperature of 0.5 

Options

  -h, --help                  help for chat
  -t, --temperature float32   Temperature of the model. Higher values will result in more creative completions, but also more likelihood of nonsensical text. Try 0, 0.5, 1.0, 1.5, 2.0

Command: askgpt image

Create an image from a prompt using the Dall-E model.

askgpt image <your_prompt> [flags]

Examples

askgpt image "A drawing of a cat."  
askgpt image "Dog is driving a car." -s 1024  

Options

  -h, --help       help for image
  -s, --size int   Size of the image to generate. Try 256, 512, 1024 (default 512)

Demo

Chat with GPT-4

askgpt chat [flags]

Generate an image with Dall-E

askgpt image <your_prompt>

Contributions

Contributions to AskGPT are always welcome! If you find a bug or have an idea for a new feature, feel free to submit a pull request or open an issue on the GitHub repository.

License

AskGPT is open-source software licensed under the MIT License.