- Get you API KEY form openai.com
- Create a file called
.env
and put your API KEY in it
OPENAI_API_KEY=XYZ
-
Install venthur/dotenv-cli
pip install dotenv-cli
-
Install Poetry and run
poetry install
-
Single question:
dotenv --dotenv .env poetry run askgpt "Why Amsterdam is known of diamonds?"
-
Single question using docker:
docker run -it --env-file .env askgpt "Why Amsterdam is known of diamonds?"
-
Summarize long text
cat article5.txt | dotenv --dotenv .env poetry run askgpt --summarize --max-tokens 256
-
Get plaintext from URL:
docker run -it trafilatura -u "https://roadtoomega.substack.com/p/the-paradigm-of-emergence-a-unifying" > article5.txt
-
Prefix article with question:
echo -e "Write a concise summary of the following text:\n" | cat - article5.txt | dotenv --dotenv .env poetry run askgpt --max-tokens 500
Loosely related to the topic