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