Discourse Chatbot 🤖 (supporting ChatGPT)

I hope your wallet is deep Ed. Every time you add data you are spending money. :). There would also be a token count challenge here at present limits.


Well I asked the AI to summarize what’s going on in this chat, and it thought that all the conversation was from me and it proceeded to give me a lecture about how inappropriate I am for doing this.

1 Like

Interesting. I have a similar case:

If there are multiple people posting and you ask the AI something like “Am I right?” Or “Summarize just my post” it wouldn’t know what’s yours. These are the two most simple prompts that are in the top of my head, there are probably tons of more scenarios where it would be interesting to know who posted what.

Just the adding usernames isn’t going to cut it tho. We should probably change the system role to something like “You are being a helpful assistant on a discussion board” to make it understand why there are random usernames in the context.

Interesting side thought, wondering how “You are being a helpful assistant on a Discourse powered discussion board.” system role would perform knowing the usernames in the context

I gave it a try, I just asked: “How to get TL3?”

This is the response:

To get TL3 or “Trust Level 3” in Discourse, you need to achieve the following requirements:

You need to be a member of the forum for at least 50 days.
You need to visit the forum regularly, at least 50% of the days within the last 50 days.
You need to read at least 25% of the total number of posts in all topics or at least 25% of the total number of topics.
You need to give at least 20 likes and receive at least 20 likes from others.
You need to participate actively in discussions by creating new topics, replying to others’ posts, and consistently give feedback to at least two or more topics each week.
You need to maintain a clean moderation record, or in other words, have not been silenced, warned, or suspended for violating community guidelines.
Once you have met those requirements, the system will automatically promote you to TL3, and you’ll enjoy additional features and perks on the forum.

Here is Rick Sanchez (from Rick & Morty, YT link here if you need some impression on how impressive this is) telling me how to edit my post:

Oh jeez, Morty. It’s easy, just look for the pencil icon or the “edit” button beneath your post. Then you can make any changes you need to, assuming you have permission to do so. Remember, though, if someone has already replied to your post, you might not be able to change certain parts of it without disrupting the conversation. Don’t go ruining the thread, Morty.

Hey brother, China can use ChatGPT (I’m from Chinese Mainland) to correct your mistakes

1 Like

This is a Chatbot. That’s another (potentially great) use case entirely but one I’m thinking about.

1 Like

Currently the bot follows the reply pointers in building the current history and will ignore messages it skips over. This was done to maintain and optimise a history of chat with the bot by each user individually. Therefore it might not see every message each time, even if you increase the history count. Happy to reconsider that behaviour if it turns out it can be significantly improved. But come back with a detailed argument please. You can probably simulate with current setup.

Note I’m not sure the chatgpt model is meant for “multiplayer” scenarios. So adding the usernames even might not work well. Please come back with detailed findings if possible We’ll have to experiment.

It is not designed for summarisation though. Consider using my other plugin for that. You can reuse the same token.


Thanks Marc really simple solution that achieved what I was looking for! I’ve just added @aibot into the template for the moment but agree there is an opportunity to include a default prompt to encourage an improved response.


So now this is merged:

The bot should now be a bit more knowledgeable as:

  • Usernames are added to all prompts in Topics and Message Channels so things should work better in circumstances where there are multiple users.
  • In Topics (chat turbo model only):
    • a prompt including the Title is included to help give the bot context
    • the OP is always included in the history
    • in both these cases, it doesn’t matter have far you are down the Topic, nor how short your look-back is, they are always included.
  • Prompts can be changed now, in Customize → Text under the keys chatbot.prompt.*. Be sure to keep the variables if required. You can strip out usernames if you want.
    • the system prompt to tell the bot how to behave in general, is now a localisation too and the setting has been removed.

@codergautam @Ed_S


Is there a way I can block specific people from using the bot, if I manually set the bots ignored users would that work?

1 Like

Just don’t add a group that contains them in the quota groups. They will be told immediately they’ve reached their quota (!) ie zero.

Let’s say I’ve created a group “Denied” and then somebody is a trust level 2 which is in the quote medium.

If I put denied in low trust and set the quote to 0 but the user is trust level 2 which is in the quote medium would this solution still work or perhaps will I have to make denied high trust?

1 Like

How much bots someone can have in a forum without broking the primary concept of the forum?

I’m asking a genuine question, because I want to see if that could be really useful in our community.

I mean, people can duckduckgo their questions, we are looking for discussions. How can ChatGPT can add value on this?

Definitely I probably are missing something, but you can share your case use (maybe an ideal one that could be done) and I will try to look into it.

1 Like

It takes the highest quota from their group membership.

My suggestion, for simplicity, is simply only add groups you definitely want to have access.

1 Like

Personally I’ve had an issue of people using my bot to not engage in intellectual content but for it to just feed them information and scripts. For example people asking: “Make me so and so in python and show me all the code”.

1 Like

My AI Topic Summary plugin is imho far more useful, but this plugin gets much more attention! My main goal was to provide access to the bot so people could experiment and work out use cases, if they exist. It will also pave the way for use with other bots in the future.


Thanks, I’ll look into it.

Can we edit their (kind of suggesting) replies on specific filters?

1 Like

You can use the admin/moderation tools to edit any of their replies, but the only influence you have on the bot is the prompts that are sent. The reply is up to the bot.


That’s some kind of scaring haha (!)

Thanks for sharing this, I will try on localhost and share my thoughts when I have more free time for fun (that’s how we get the useful things, you know :ok_hand:)


Correct, I believe the amount of history influences system role. When we change the system role while testing, the bot sees X amount of it’s own messages and will most likely adapt towards the history. In new topics, you’ll see the system role is much stronger respected.

You can edit (currently) the locales (search for chatbot.prompt), the system role is what defines “who” your bot is and what rules it will follow. The rest is basically what @merefield said, based on user input, earlier posts, topic title and body.

Review your weekly limits for TL/groups and make them aware of this. If you set it too high you might get the result you are getting. Also if it’s new, people just wanna play with it and some may have never heard of it, just like we are exploring!

  • Ask AI to verify the information
  • Ask AI to give an alternative suggestion
  • Ask AI for ideas
  • Ask AI to check spelling
  • On tech forums, it can be useful in many aspects with all code languages.
  • It can help a user navigate around Discourse
  • You have a ChatGPT platform where your history is cross-platform available - your own Discourse.

Some of these might be useful to the community, some for private topics, some for “researching categories”, you can use it to improve drafts etc etc… you get the idea.


Hello, we would like to try on our server. people love chatbots nowadays! can we customise the float chatbot icon? thanks