Skip to content

yersonargote/chatgpt-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python CLI to use chatGPT api

API KEY

Create a file named .env and place inside the API KEY

# .env file
OPENAI_API_KEY=YOUR_API_KEY

Install dependencies

pipenv install

Run app

Option 1

pipenv shell
python3 main.py "filename" "message" "system"

Option 2

pipenv run python3 main.py "filename" "message" "system"

Use

python3 main.py solid "What are the SOLID principles?"
python3 main.py solid "What are the SOLID principles?" programming

Arguments

  1. Filename
  • The conversation is saved in ./chat/{filename}.json
  1. Message
  • Is the input message of the user
  1. System
  • The system message helps set the behavior of the assistant

System options: default and programming

About

Python CLI to use chatGPT api

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages