Discourse Chatbot 🤖 (Now smarter than ChatGPT!*)

The bot should not reply unless mentioned or explicitly replied to so long as there is more than one human participant in the topic or channel. If there is only one human in the Topic or Channel, the bot, if already engaged, will assume the message is for it (pretty logical, no?).

There shouldn’t be any need to change that currently designed behaviour, unless we find a bug? I certainly don’t want to add any UI elements if at all possible.

2 Likes

What about disable replies in closed threads? Bot seems to read ‘closed’ message as a prompt.

If not the bot is like god and that’s not OK for the forum management.

I see that two people and bot chat enables double responses until ‘the third’ comes into the show.

That little details are the only that I found that could be adjusted more than detailed on the OP. The rest superb! I hope it helps :+1:

2 Likes

That’s a to do and reported above. I’ll get around to sorting that soon. I recently fixed a similar bug for the summary plugin. Should have added that to known issues. Only normal posts should be counted as a trigger or processed as replies.

Maybe that’s confusing the algorithm.

Can you be any more specific about the circumstances? That would definitely not be intended behaviour.

1 Like

I started a chat with another user and AIBot, mentioned AIBot and it start to reply more than expected (and repeating messages).

It’s like he ‘don’t see’ the user and only me, because the user didn’t really join into the conversation at this time.

1 Like

Ah … I think I can explain this, sounds like an edge case (?):

Number of human’s counted only includes people who have actually posted messages/posts. I suggest (for now at least) a couple of workarounds:

  • not addressing the bot until 2nd user has posted if you don’t want the bot to keep talking. Bot should stop auto-responding as soon as second person actually takes part beyond just reading.
  • delete the unwanted bot responses.

Can you confirm the bot stops auto-responding once a second person has actually posted?

This behaviour is designed to make it easy to talk to the bot when no other person is actively involved. I’m not sure, on balance, how we could improve upon that?

As for repetition, that’s up to Open AI’s model.

2 Likes

What about ‘wait until chat recieve two people replies’? I don’t really know if there is a trigger like that is but I suppose that could be feasible.

  • I can confirm that multisites are working if we don’t used default categories to trust levels before.
  • And chatting alone with the bot is almost impossible because it just talks all the time and burn tokens without utility.
1 Like

But what if you wanted a reply from the bot before?

If you do not invoke the bot before the second person has joined and contributed to the conversation, the bot will not speak. Is that so limiting?

Normal chat channels almost certainly have more than one participant who has actually said something.

1 Like
  • FEATURE: strips quotes from all Post prompts (bar OP) if setting set (ON by default) - reduces token usage and should reduce potential confusion.
  • FIX: Post prompt history will not include moderation action posts
  • FIX: bot will not be invoked by any Topic moderation action

Let me know if these changes cause additional/new issues.

4 Likes

@merefield - Fantastic work! Just amazing :slight_smile: Thank you for this. In your opinion, would there be any practical use for me to install this on SWAPD? :smiley: And does it affect performance?

2 Likes

Hey David,

Treat it as highly experimental. It wouldn’t be integrated to specific workflows out of the box, but you might find it amusing and may find unexpected applications after testing it out.

The key thing is context. It reads the last x posts or messages and decides how to respond based on that and your final prompt. You can design a system prompt to make it behave “in character”.

Not especially, there’s one lightweight job run for each response.

2 Likes

We are talking about 3 people (with aibot) on conversation. The bot could not send nothing until the others say hello and that will prevent the repeated messages but not limit the expected interaction.

Everyone could send 1on1 message to Aibot and that’s not supposed to be affected with this ajustment.

I’m asking about that because I’m not the only one using the forum and that will prevent a lot of unexpected behavior.

It’s simple for us just to wait the other guys write something before mentioning the bot but not everyone will do it :grimacing:

1 Like

Sorry, I’m still confused with your proposal:

  • If you mention the bot alone in a Topic or Message Channel, the bot will chat
  • As soon as a second person has posted a message or Post, the bot will no longer respond unless targetted.

I deliberately designed it this way to cater for this exact issue.

Is this not a good enough solution?

1 Like
  1. If you talk alone with the bot the messages are repeated and not-sense. It seems to be related to OpenAI, not a big trouble because we can limit 1on1 chat and that’s all.

  2. If you add someone to chat with AIBot in 3 group chat, the same happens if someone mention bot first.

That breaks the conversation and could be avoided. So AIBot waiting for two humans until send a reply could solve that specific issue as a workaround.

Nobody wants to talk now to the bot first in chat but that could be limited to avoid an unexpected behavior until the first issue is solved.

1 Like

So why talk to the bot at all until the second person arrives and begins to chat? Isn’t that the solution?

And in any case the bot would stop replying as soon as the second person has posted a message.

I’m not sure I understand this

You can’t “add” someone to personal chat presently in Discourse?

In main channels, e.g. General, the bot will not speak unless targetted. I’ve just checked and indeed it must be targetted from the word go, as this is classed as not a “Direct Message” type channel.

Test case in point:

Bot didn’t reply as not targetted.

Once targetted it replies:

Also the bot is working fine here 1 to 1, so I’m not seeing your issue with 1 to 1 conversations with the bot in shared areas either?

We probably should take this conversation offline in private chat if you wish to elaborate further.

1 Like

Ah @matenauta I see the problem.

The issue is not the intended rules, it’s a bug.

It’s not working as intended on Direct Messages with two human participants. It is not currently following the rules I set out above. I will take a look.

3 Likes

OK that’s done.

The existing logic was correct, but the user count attribute of a channel is updated by a job and this job is not guaranteed to have run on a timely enough basis for use in this decision, so it is better to calculate it from first principles which I’ve now done.

Actual messages were not necessary for the bot to shut up, only the channel user membership count, but this was incorrect at time of checking, now fixed. Apologies for the confusion.

5 Likes

There might also be the option to run an LLM locally on your server but you’d need a very expensive powerful server well above the minimum spec required to run the actual Discourse, turning your install basically into an LLM service with a Discourse tacked on the side ;). That’s almost certainly going to cost more.

I’m afraid the only practical solution at present is paying for the API use once any free trial period has ended. Much like email.

2 Likes

Hi, I’m grateful for this great plugin, my friend. How can I customize the ChatGPT widget button?

image

2 Likes

CSS, Customize → Text under chatbot and plugin api to swap the icon

3 Likes

Thank you for the great tip. :ok_hand:

2 Likes