Skip to main content

PyQt OpenAI example

Project description

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 by default.

Image generation feature available since v0.0.16. You can see the detail in official OpenAI site. Currently this feature is very basic now.

You can select other model with the combobox on the sidebar at the right side of the window.

An internet connection is required.

Requirements

  • PyQt5

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

  • openai

Preview

image

How to play

  1. git clone ~

  2. from the root directory, type "cd pyqt_openai"

  3. You should put your api key in the line edit. 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.

  1. 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.

TODO list

  • logging

  • fine-tuning (with JSONL) - currently working

  • Add the fine-tuned model in combo box

  • Sync the fine-tunes, analysis (with wanDB)

  • show the explanation of every model and terms related to AI (e.g. temperature, topp..)

  • Basic style

  • highlight the source

  • Add the basic example sources of making deep learning model with PyTorch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqt-openai-0.0.171.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

pyqt_openai-0.0.171-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file pyqt-openai-0.0.171.tar.gz.

File metadata

  • Download URL: pyqt-openai-0.0.171.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for pyqt-openai-0.0.171.tar.gz
Algorithm Hash digest
SHA256 a5b2f0e5eda9027f4483936bf954238ee487911503a7261a35faa35505e00e54
MD5 2bbe931a3c0aee95cde069608f3a092a
BLAKE2b-256 9fd6c8e1b52fd67ddb05f3a0094054d3bb122c80ecadcf46a1ab2f979c678aba

See more details on using hashes here.

File details

Details for the file pyqt_openai-0.0.171-py3-none-any.whl.

File metadata

File hashes

Hashes for pyqt_openai-0.0.171-py3-none-any.whl
Algorithm Hash digest
SHA256 ddd33a5a90462b8e316ac355b34cd7ec06f024140fcf96a647fbf5facb7b2140
MD5 a2b5eb49b7b6696bc3e066de0c42ab61
BLAKE2b-256 c177a75ebcc5cf90656b5173c46fa9c6f9d0fea9ce901e7a38c27c0fb8894484

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page