Skip to content

lopez-hector/simple_OpenAI_chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple CLI Interface for OpenAI

Create a conversation interface with OpenAI. Conversation will be remembered up to context limit of the model.

Setup

  1. git clone https://github.com/lopez-hector/simple_OpenAI_chat.git 2. cd simple_OpenAI_chat
  2. Set your OPENAI token
  3. Set up environment
    1. python -m venv env
    2. source env/bin/activate
    3. pip install -r requirements.txt

How to use

python chat.py

  • will default to chat-gpt (gpt-3.5-turbo)
  • can specify GPT-4 (if you have access)
    • python chat.py -m gpt-4

Entering text

It supports mult-line entry, so you may use the return key to continue your input.

To submit your input, append with /end

Exiting

Input quit and the chat interface will close.
You may also of course escape.

Example

Starting chat interface

python chat.py

First query (must end with /end to submit)

img.png

Result

img_1.png

About

CLI chat dialog with open ai api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages