File | Date | Author | Commit |
---|---|---|---|
.github | 2024-02-28 |
![]() |
[188cd3] Create dependabot.yml |
pyqt_openai | 2024-08-29 |
![]() |
[310785] Fix Replicate api initializing related issue |
.gitignore | 2024-08-08 |
![]() |
[8b1110] Convert each type correctly when convert ini in... |
LICENSE | 2023-02-05 |
![]() |
[b1ac47] Initial commit |
MANIFEST.in | 2024-08-26 |
![]() |
[02de97] Set correct paths of each resources |
README.md | 2024-08-15 |
![]() |
[415536] Update README.md |
pyproject.toml | 2024-08-21 |
![]() |
[bd959e] Support pyside6 only for release and fast perfo... |
requirements.txt | 2024-08-21 |
![]() |
[bd959e] Support pyside6 only for release and fast perfo... |
This application is developed using PyQt/PySide.
It supports Windows, macOS, and Linux.
It uses SQLite as a database.
You can use OpenAI models (GPT-4, GPT-4 Mini, DALL-E, etc.) and Replicate image generation models with PyQt.
The major advantage of this package is that you don't need to know any language aside from Python.
If you want to study OpenAI with Python-only in a good old desktop software environment, this is for you.
You can select the model and adjust each parameter of OpenAI from the right sidebar.
Additionally, you can combine OpenAI with the Llama-Index feature to make the GPT model answer your questions based on the information you have provided!
If you have any questions or if you want to develop AI-related software with PyQt or PySide, feel free to join the Discord server!
If you would like to support this project, please click the button below to make a donation. Your contribution will greatly assist various projects, including this one!
If you have any additional languages you would like to add, please feel free to make a request by mail, issue, discord, etc at any time.
Also you can submit a pull request if you want to update any words naturally by modify "translations.json" in "lang" directory.
You can install these requirements with only one line command "pip install -r requirements.txt". Just see "How to Install" section below.
You have to write your openai api key inside the red box. see How to install
You can change screen between text chatbot and image generating tool screen.
If you want to use this with your personal chatbot based on data you've given, then you can check the llamaindex checkbox and go to the tab, select the directory which includes .txt files containing the data.
I recorded this preview long time ago so GUI is different from the current version, but way of operating it is pretty much the same.
https://github.com/yjg30737/pyqt-openai/assets/55078043/841a1505-f1cc-452e-99ab-0a9c661e6ead
You can save checked conversation units to SQlite db file or compressed file (zip) which contains each conversation as text/html file.
This application has two types of prompts. One is "Properties" and the other one is "Template". Properties are sets of attributes that are useful for forming the premises of a question. Templates are sentences that correspond to a single command. You can input a command to generate a sentence. This can be used as a question in itself.
Both types can be managed as groups. After cloning or installing, if you run the program immediately, you will be able to see the default group and the items included in the group, just like the screen.
For properties, there is a group named "Default" that provides a set of attributes referenced here.
For templates, there are the "awesome_chatGPT_prompt" and "alex_brogan" (example prompt for Alex Brogan) groups provided. Any custom template items created prior to version 0.1.6 will be moved to the Miscellaneous group.
With using these prompts you can pretty much get any response you want.
You can use the additional prompt feature by "prompt menu" right next to "prompt input" field.
Since v0.1.6, awesome-chatgpt-prompt is included as template group by default.
Generating the prompt (Properties)
https://github.com/yjg30737/pyqt-openai/assets/55078043/e168c0e6-41b4-4ad5-95e6-3c42c9c23602
I recorded using the Windows recording feature. As a result, the "Add Dialog" that prompts for entering a group name does not appear in the preview. When you add a group, you will see the Add Dialog as expected.
Then, how to generate template type prompt? Click any item in the group, it will be shown in the preview.
You can copy that generated text with clicking "copy" button and include it to your prompt input.
If you add a property group or template group with items, you can use it as a command by typing its name to the prompt input.
Use prompt as a command
https://github.com/yjg30737/pyqt-openai/assets/55078043/df0d3923-1fbe-4dda-af6f-4e4d1e572553
In this preview, i pressed the keyboard shortcut of each actions(show beginning, show ending, support prompt command) to use it rather than clicking them with mouse.
I made the command suggestion GUI resemble the Discord command autocomplete popup, with which a lot of people have become accustomed.
If you use Linux and see this error:
qt.qpa.plugin: could not load the qt platform plugin "xcb" in "" even though it was found
this application failed to start because no qt platform plugin could be initialized, reinstalling the application may fix this problem
run this command:
sudo apt-get install libxcb-xinerama0
Please check that the path does not contain any other invalid languages.
First, do this:
pip uninstall -r requirements.txt
second, do this:
pip install -r requirements.txt --upgrade
then it will work :)
Please do not distribute this commercially without my permission, by claiming it as your own creation.