8000 GitHub - iuriimattos2/pyqt-openai: Example of using OpenAI with PyQt (Python cross-platform GUI toolkit)
[go: up one dir, main page]

Skip to content

iuriimattos2/pyqt-openai

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqt-openai

Example of using OpenAI with PyQt (Python cross-platform GUI toolkit)

This shows an example of using OpenAI with PyQt as a chatbot.

The OpenAI model this package uses is the text-davinci-003 model of GPT-3.

An internet connection is required.

Requirements

  • PyQt5
  • aiohttp - It needs to be installed for the current version of OpenAI.
  • openai

Preview

Preview 1

image

Preview 2

image

How to play

  1. git clone ~
  2. from the root directory, type "cd pyqt_openai"
  3. in the pyqt_openai directory, you'll see the "main.py" file. Open it and you can see lines below
# this API key should be yours
# openai.api_key = '[MY_OPENAPI_API_KEY]'

You should get your [MY_OPENAPI_API_KEY]. You can get it in official site of openai. Sign up and log in before you get it.

Be sure, this is a very important API key that belongs to you only, so you should remember it and keep it secure. 4. python main.py

If installation doesn't work, check the troubleshooting below.

Troubleshooting

If you see this error while installing the openai package

subprocess-exited-with-error

you can shout a curse word and just download the package itself from pypi.

Unzip it, access the package directory, type

python setup.py install

That will install the openai.

About

Example of using OpenAI with PyQt (Python cross-platform GUI toolkit)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0