Integrating GPT3-like bots?

I took a look at this briefly because of my historical involvement/interest with :robot:'s in the Discourse space.

The authorisation of the API calls to the web-based ChatGPT is currently quite involved (and annoying, forcing you to mimic a web browser, for example) and some interim open source API wrapper solutions have since failed as theyā€™ve tightened this up.

I suspect, for the time being, they are actively trying to make reverse engineering the official website API calls hard[1] and it might be worth waiting for the official API for a fully conversant ChatGPT which will surely come to avoid this complexity and any abuse of the terms of service that you may risk? Looking at OpenAIā€™s Discourse (:+1: ), this appears to be others thinking.

But letā€™s ask the bot directly?:

Noting there is already an official OpenAI API but this doesnā€™t support ongoing conversations in quite such a convenient manner (you appear to have to send all history every time in a context variable! That is too wasteful (and ultimately expensive) for me to bother in the meantime! :sweat_smile: ).

Hopefully they will release an official API with a simple conversation reference at some stage soon. No doubt there will be a price attached! :sweat_smile:


  1. I suspect this is partly because they are also employing a moderation API which is presently separate from the bot calls? ā†©ļøŽ

5 Likes

@philip_rhoades or anyone else here ā€” did you end up implementing a Discourse bot with GPT-3?

I envision bots for bootstrapping community activity, who can be configured to respond in different styles to comments made by visitors or each other. Youā€™d have the main forum tooic, the topic of the thread, and the first post in it as inputs. The bot would use the API to generate some text and make sure it is different enough than the other bots. Each would discuss a different aspect of the original post. Then, it would let human discussion follow. If no one responds on a thread for a week, a bot may resurrect that thread by replying again, this time to one of the previous posts.

The bots wonā€™t really be able to link to outside articles, but thatā€™s coming, it can be a different process to do that.

To be ethical, every bot would need a profile that says itā€™s a bot powered by GPT-3.

Anyone interested in writing a Discourse plugin to do that? I would pay for this from our company. When it comes to AI, this is one area where we prefer to NOT open source things for fear of being abused (although it is fairly trivial for someone else to do it and open source it).

Are there any Discourse plugins that facilitate the creation of synthetic accounts that use cron to post? How do they work?

4 Likes

I would definitely be interested, but I would suggest a pause if you want a conversational bot until they provide the full official conversational API (any hack is likely to break T&Cs)

If you donā€™t mind a simple single call and response solution, work could definitely start soon. Feel free to PM me.

4 Likes

Right, I actually donā€™t even want ChatGPT. Just GPT-3. Is there anything against the terms of service when it comes to what I suggestedā€¦ it wouldnā€™t be interactive but just one post per few days by each bot. It is not ā€œastroturfingā€ since the bots are only in our forum and are clearly labeled in their profiles:

https://www.technologyreview.com/2020/10/08/1009845/a-gpt-3-bot-posted-comments-on-reddit-for-a-week-and-no-one-noticed/amp/

1 Like

To be clear, you can make it a little interactive, but itā€™s rather unwieldy at present.

The current open AI API for GPT3 would probably be fine for that use case, in any case.

Not sure how weā€™d prompt the bot to prompt (perhaps a job of some kind) but lets discuss, definitely interested, feel free to DM here.

1 Like

Wait, as often happens when I start writing, I just realize something! Since we do not want other forum owners to copy or resell the code in this case, we can just develop a closed source service that creates accounts on discourse and fills out their profiles, and then periodically posts as those accounts! Does discourse have some sort of Whitelist four accounts to prevent them from being shadow banned based on all coming from the same IP address or something?

1 Like

Are you proposing a bot that would register on third party Discourse instances (that you donā€™t own) and masquerade as a real user?

1 Like

Hi @merefield and @EGreg,

Iā€™m also interested in a GPT integration using the AI API.

Is it an idea to join forces together and see if we can create something like this for the Meta community? Iā€™m willing to financially join.

1 Like

Okay ā€¦ shoot me an email

greg

at the domain

qbix.com

3 Likes

GPT-3 pricing can be expensive, my community was able to suck up $2.00 worth of credits in 15 minutes using a Chat GPT bot.

1 Like

FYI

This is not a recommendation; just pointing out a site related to transformers, the T in GPT (Generative Pre-trained Transformer), that is worth a look. :slightly_smiling_face:

While I do understand the concepts of neural networks, transformers and GPT, I personally donā€™t have the resources to train them further do to the high cost but do keep up on them. Also I am aware of what I consider some of their Achillesā€™ heels [1]. Donā€™t take that to mean I donā€™t like them I just feel that out of the box they are not ready for prime time as I need.

[1] Dr. Vaughan Prattā€™s 1994 Qs to Evaluate Cyc, Asked of ChatGPT (ref )

3 Likes

I shoot you an email but I havenā€™t received any response so far?

FYI

From OpenAI tutorials

Website Q&A with Embeddings

Learn how to build an AI that can answer questions about your website

This tutorial walks through a simple example of crawling a website (in this example, the OpenAI website), turning the crawled pages into embeddings using the Embeddings API, and then creating a basic search functionality that allows a user to ask questions about the embedded information. This is intended to be a starting point for more sophisticated applications that make use of custom knowledge bases.


OpenAI has a Discourse forum!!! which is not so easy to find.

They make it easy to find the Discord site but I avoid those like the plague.

Especially if you didnā€™t read my post :wink:

1 Like

Here is a great implementation of a GPT bot that is able to use the entire website context built ontop of supabase (open source):

I suspect, Discourse and supabase would be a great alignment here. A plugin that undergoes forum embeddings using the approach in that video above, and then creates a user backed by that would be amazing.

I would certainly be interested. But unfortunately, I think if itā€™s not in the open source space we will be wasting our time and effort, as the most maintained plugin will end up being the one that is open source. And if you create and use a closed source version you will be stuck with a maintenance burden.

If you are both willing to financially join, I am in the position to make it a reality. And quite soon if desired. But it would need to be under the Apache-2.0 license.

I also suspect this would seriously help the Discourse company if a plugin like this was able to be an official plugin. Is that something the Discourse company might be interested in?


I might be able to get a matched funding grant from the government where I live in order to support the creation of this. If you are keen to financially join, let me know. Iā€™ll be happy to run the hosting infrastructure, and anyone financially contributing at the start to the plugin creation would be able to have a significant discount on the seamless hosted solution that indexes your forum, and creates intelligent GPT bots for your discourse.

3 Likes

Simon,

I tried to reply to the Discourse email but got a server (which I will investigate separately) but this is what I said:

"I have sent the guy a note about whether he could help with my use case here:

https://forum.phirho.org

  • it would be nice if he could help out . .

Phil."

Thatā€™s very interesting, thanks for sharing!

Hey, some good news regarding our team here at Discourse.

For the next release cycle, we at Discourse have elected AI as of our priorities for new features and plugins. That means that we now have a dedicated team working on features like LLM integration, and will present those soon here on Meta.

18 Likes

Excellent news! - then if you could add a persistent memory for previous conversations . .

5 Likes

That is some great news! :slight_smile: Thanks for the heads up, I really donā€™t want to be reinventing the wheel when youā€™re going to be building something amazing :slight_smile:.

Cheers,
Simon

3 Likes

It seems like a smart decision. I have learned quickly through utilizing ChatGPT and receiving feedback from users who lack technical knowledge, that they are not familiar with the concept of prompt engineering. Hence, I would like to share this resource:

If you are seeking individuals to test and provide feedback on early releases, please include me and I would be happy to assist if I am available.

2 Likes