Skip to content

Python script to access ChatGPT from the terminal with the OpenAI API

License

Notifications You must be signed in to change notification settings

mylinuxforwork/chatgpt-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatgpt-cli

IMPORTANT: Please note that the script is currently under development and needs to be updated to the new OpenAI API.

Easy to use script to send request to the openai chatgpt api.

Getting started

To make it easy for you to get started, here's a list of recommended next steps.

# Install the required python packages
./1-install.sh

# Copy the openai.yaml to your home directory and add your openai api key to the file.
vim openai.yaml

# Define the path to openai.yaml
vim mychatgpt.py

# Start the script
python mychatgpt.py

# Tipp: Create an alias in your .bashrc
alias chat="python mychatgpt.py"

# Start the script just by typing
chat

# Example input
Hello, how can I help you? Write 1 paragraph about Berlin.

About

Python script to access ChatGPT from the terminal with the OpenAI API

Resources

License

Stars

Watchers

Forks

Packages

No packages published