Skip to content

elinorp-d/mychatgpt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mychatgpt

Simple code to simulate querying from GPT and recreating ChatGPT in your terminal.

Steps

  1. Get your own API key from openai.com and set it as an environment variable OPENAI_API_KEY
  2. From the current directory, run ./askai.sh [--model MODEL] [--q QUERY] [--c chat mode] where
  • --model defaults to gpt-3.5-turbo
  • --q is a query for the model OR
  • --c flags interactive chat mode (to end, type exit or Ctrl+c)

Setting up aliases

Here are example aliases to use in your terminal for easier use:

alias gpt="<your_path>/mychatgpt/askai.sh --model gpt-4-1106-preview --q"
alias gpt3="<your_path>/mychatgpt/askai.sh --q"
alias chatgpt="<your_path>/mychatgpt/askai.sh --model gpt-4-1106-preview --c"
alias chatgpt3="<your_path>/mychatgpt/askai.sh --c"

(You may need to replace line 4 in askai.sh to the absolute path to the python script in order for this to work)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.9%
  • Shell 39.1%