https://github.com/serhhat/askgpt
AskGPT is a CLI that allows you to interact with ChatGPT and Dall-E
https://github.com/serhhat/askgpt
chatgpt cli dall-e golang openai
Last synced: over 1 year ago
JSON representation
AskGPT is a CLI that allows you to interact with ChatGPT and Dall-E
- Host: GitHub
- URL: https://github.com/serhhat/askgpt
- Owner: serhhat
- Created: 2023-02-22T03:25:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-16T13:18:49.000Z (almost 3 years ago)
- Last Synced: 2025-04-02T15:17:27.396Z (over 1 year ago)
- Topics: chatgpt, cli, dall-e, golang, openai
- Language: Go
- Homepage:
- Size: 5.15 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
* [OpenAI API Key](https://platform.openai.com/account/api-keys)
You need to generate an API key and export it as an environment variable:
```shell
export OPENAI_API_KEY=
```
### Installation and Running
#### **Via [HomeBrew](https://brew.sh/):**
First, install the tap:
```shell
brew install sariserhat/tools/askgpt
```
Then, you can run the executable:
```shell
askgpt
```
#### **Via [Source Code](https://github.com/serhhatsari/askgpt.git):**
First, clone the repository:
```shell
git clone https://github.com/serhhatsari/askgpt.git
```
Then, build the project:
```shell
go build cmd/askgpt/main.go
```
Finally, you can run the executable:
```shell
./askgpt
```
## Usage
### Command: `askgpt chat`
Start a chat session with ChatGPT.
```shell
askgpt chat [flags]
```
#### Examples
```shell
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 [flags]
```
#### Examples
```shell
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
```shell
askgpt chat [flags]
```
### Generate an image with Dall-E
```shell
askgpt image
```
## 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.