Skip to content

mysticrenji/openai-chatgpt-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openai-chatgpt-python

Simple program to call OpenAI Service using Python

Install OpenAI Service Library

pip3 install openai

Execute the python program using below

export API_KEY='sk-XXXXXXXXX'
export MODEL='gpt-3.5-turbo'
export ROLE='user'

python3 play-openai.py "What model of gpt are you using for this chat conversion"

The article for the setup can be found here