Two Discourse OpenAI Bot Plugins (GPT3, Dall-E)

Hi Everyone (first post here):

Completed two OpenAI plugins which utilize the ruby-openai gem. Both of these plugins are live at community.unix.com.

The ruby-openai gem worked well. The only issue (which took quite some time to resolve) was the gem dependancy spec for httparty in the ruby-openai gem specified both lower and upper versions and this spec would not parse with the Discourse gem parser for plugins (after many hours of hair pulling). I hacked around this issue by adding the gems during the container build process. Too much details maybe? haha

For the Dall-E plugin, I noticed the URL generated by the API expired in two hours after creation. Because Discourse uses Redis jobs to download hot-linked URL images, I found it better to download the OpenAI image immediately and use a local URL versus using the OpenAI generated URL, because sometimes the image was not downloaded before the OpenAI URL expired. This was also good for debugging, so even if the OpenAI URL did not expire, I think I would keep the “download to the server before processing” method.

These plugins will respond to the first topic posted in designated forums, specified in the site settings. Anyway, the owner of ruby-openai has a PR for this change (to remove the upper limit in the gem spec).

Here is an example of the site settings for the Discourse OpenAI Dall-E Bot Plugin:

Here is an example of the site settings for the Discourse OpenAI (Chat) Bot Plugin:

Here are some examples from the forum plugin from this AWESOME OpenAI API:

I never really had a good opinion about AI until OpenAI released ChatGPT and Dall-E. AI apps seemed too specific to a domain or too much like earthworm brains. Now, I think ChatGPT is often more interesting to chat with than many people I know, hahaha.

Looks like OpenAI has paved the road for generative AI for everyday users and will be the most interesting tech talk in 2023.

Thank you, OpenAI!!

References:

Here are the links to the alpha release announcements:

Here are the links to the two OpenAI API enable forums.

Dall-E

ChatBot

Hope this helps.

1 Like