Skip to content

b1r3k/askgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

  1. Get you API KEY form openai.com
  2. Create a file called .env and put your API KEY in it
OPENAI_API_KEY=XYZ
  1. Install venthur/dotenv-cli

    pip install dotenv-cli

  2. Install Poetry and run poetry install

Usage

  1. Single question:

    dotenv --dotenv .env poetry run askgpt "Why Amsterdam is known of diamonds?"

  2. Single question using docker:

    docker run -it --env-file .env askgpt "Why Amsterdam is known of diamonds?"

  3. Summarize long text

    cat article5.txt | dotenv --dotenv .env poetry run askgpt --summarize --max-tokens 256

  4. Get plaintext from URL:

    docker run -it trafilatura -u "https://roadtoomega.substack.com/p/the-paradigm-of-emergence-a-unifying" > article5.txt

  5. 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

References

Loosely related to the topic

  1. openai-cookbook/techniques_to_improve_reliability.md at main · openai/openai-cookbook
  2. Summarizing Books with Human Feedback
  3. Learning to Summarize with Human Feedback
  4. bart-large-cnn
  5. daveshap/RecursiveSummarizer

About

Command line client for openai GPT3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages