Building from source:
- Install Go
- Navigate to the
cli
directory - run
go build
cd cli
go build
./ask-gpt "Why do trees grow branches?"
Required
- OPENAI_API_KEY
Optional
- OPENAI_MAX_TOKENS
- Can vary from
1
to2048
(newer models allow4000
for large answers)
- Can vary from
- OPENAI_TEMPERATURE
0.0
meaning the safest answer,1.0
most 'diverse', here the default is0.7
- OPENAI_MODEL
- Reference
text-davinci-003
text-curie-001
text-babbage-001
text-ada-001
Example of a .env
file:
OPENAI_API_KEY=sk-abcdefg
OPENAI_MODEL=text-davinci-003
OPENAI_TEMPERATURE=0.7
OPENAI_MAX_TOKENS=30