Skip to content
/ qopenai Public

Qml plugin for OpenAI endpoints(ChatGPT, DALL-E and others)

License

Notifications You must be signed in to change notification settings

omrdk/qopenai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

An OpenAI QML plugin that could be used in Qt-based projects.

Features

Authentication

Make sure you defined OPENAI_API_KEY environment. You could also do that active kit's run configuration on Qt Creator:

Projects -> Your kit -> Run -> Environment -> Details -> Add: OPENAI_API_KEY="your-key"

How to link qopenai

  • Copy qopenai folder under your project's root directory
  • Add qopenai as a sub-directory in project's root CMakeLists.txt file after creating executable for your target(see qt_add_executable):
add_subdirectory(qopenai)
  • Link required Qt modules and qopenaiplugin to the target:
target_link_libraries(appexample PRIVATE qopenaiplugin)
  • Should you be interested in using this plugin as a library and instantiate them in C++, link it to the target with qopenai name instead of qopenaiplugin as below:
target_link_libraries(appexample PRIVATE qopenai)
  • Then include directories for target to be able to #include and instantiate them in C++:
target_include_directories(qopenai PUBLIC ${CMAKE_SOURCE_DIR}/qopenai "${CMAKE_BINARY_DIR}/qopenai")

Appendix

  • Example app tested on Windows, OSX and iOS platforms with Qt's 6.5.0 kit.

"Buy Me A Coffee"

About

Qml plugin for OpenAI endpoints(ChatGPT, DALL-E and others)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published