2023-05-27 12:11:35 +02:00
2023-05-26 23:43:28 +02:00
2023-05-27 12:11:35 +02:00
2023-05-26 23:43:28 +02:00

ChatGPT command line interface

ChatGPT in the command line, extended with the ability to run bash commands (in a container). Although the host file system is not exposed it can still hypothetically fork bomb your computer. Use at your own risk.

Build

go build cmd/ask.go

Example usage

Run (Interactive mode)

With gpt-3.5-turbo (default)

$ ./ask
ChatGPT gpt-3.5-turbo interactive mode
>

With gpt-4

./ask --model=gpt-4

gpt-4 will usually utilize its command line to solve tasks that it traditionally struggles with, such as maths or counting words:

./ask --model=gpt-4
ChatGPT gpt-4 interactive mode
> how many words are in the sentence "hello dear world!"?
# /echo "hello dear world!" | wc -w
$ 3

# Yes, there are 3 words in the sentence "hello dear world!"

Run single query

 $ ./ask write a python array of 10 nouns

nouns = ["apple", "cat", "book", "car", "tree", "house", "pen", "computer", "phone", "water"]
Description
No description provided
Readme 44 KiB
Languages
Go 98.7%
Dockerfile 1.3%