Discourse Chatbot 🤖 (Now smarter than ChatGPT!*)

Have a look in this topic:

2 Likes

Interesting. So it seems like it has been upgraded for me. There was actually a commit AFTER I had upgraded so it showed up as that for me. I will enable the plugin and see if I can reproduce the bug.

2 Likes

Guys, I’m not recommending using this plugin in Production right now, I’ll put a note in the OP.

If you want to help out with testing, please use a development or staging site.

Once we’ve reached stability I’ll re-recommend it for Production.

I’ll put a note in the OP.

5 Likes

Ummm, I’m on the latest version and this is happening:

I’m wondering if the chatbot is responding because it has responded in this channel before.

Thanks.

2 Likes

Weren’t you in the stuck upgrade? Is it possible that it’s processing stuff from during the upgrade?

2 Likes

Yes, but it is showing as completed now, after I did “Reset Upgrade” and rebuilt.
(It’s ahead of the commit that has supposedly fixed this issue from happening)

2 Likes

Short update, the AI replies in topics/posts should be better. I ran some tests and think something is still not right but at least it’s acting with knowledge from the topic.

If you want to help testing this, you can do so to test new topics (in a private category, to start with), mention the AI, provide clear information, numbers are simple to test with. Create a chain of max 10 posts with at least 2/3 numbers (default setting = 5 posts history), then ask if it recalls all the numbers mentioned earlier, in my test it completely “forgot” about one number - while it replied to it earlier.

Current known behavior - then AIBot has been mentioned once in a topic, it keeps replying until a third user comes in.

There are still some bugs with chat - which we will hopefully sort out tomorrow. Want to thank @merefield for the time he puts in. Good night for now.

2 Likes

OK I’ve concluded things are stable now and the obvious big bugs are resolved.

Chat support is finally working properly and Post responses now use the correct history when there’s been an explicit reply to a Post and make much more sense!

Thanks to @jimmynewtron and especially @MarcP for their collaboration and critical feedback.

5 Likes

AIBot seems to be broken in one of my toipcs. Not a concern for me but thought I’d report in case it’s useful. I’m pressing the topic reply and it’s only me and aibot that’s in the discussion

Message

OpenAIBot: There was a problem: undefined method user_id’ for nil:NilClass`

Backtrace

/var/www/discourse/plugins/discourse-chatbot/app/jobs/regular/chatbot_reply_job.rb:56:in `rescue in execute'
/var/www/discourse/plugins/discourse-chatbot/app/jobs/regular/chatbot_reply_job.rb:51:in `execute'
/var/www/discourse/app/jobs/base.rb:249:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/app/jobs/base.rb:236:in `block in perform'
/var/www/discourse/app/jobs/base.rb:232:in `each'
/var/www/discourse/app/jobs/base.rb:232:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/sidekiq-6.5.8/lib/sidekiq/processor.rb:202:in `execute_job'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/sidekiq-6.5.8/lib/sidekiq/processor.rb:170:in `block (2 levels) in process'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/sidekiq-6.5.8/lib/sidekiq/middleware/chain.rb:177:in `block in invoke'
2 Likes

Might be an issue from a post created by a prior version. Can you delete all bot posts on that topic and rerun the conversation?

2 Likes

That fixed it yes- thanks. I just deleted the bot messages. However then when I asked it to summarise the thread it didn’t have anything to summarise. Does the history that gets sent to openai count the deleted messages when selecting the number of messages to include?

2 Likes

The resolved issue might still have an impact as it will include linked Posts virtue of a reply regardless of deleted status.

The best thing would be to test it on a fresh Topic tbh.

Also consider my other plugin which is precisely aimed at the job of summarising a Topic using their most optimal model for that task.

2 Likes

I am somehow able to reproduce something related in a newer topic that had convo only with the AIBot.

OpenAIBot: There was a problem: undefined method `reply_to_post_number' for nil:NilClass

Repro - create N posts (where N is the history in amount of posts you allow the bot to retrieve), then delete N posts and ask the bot for a reply.

2 Likes

The bot is not getting context correctly.

1 Like

Works ok for me:

image

1 Like

I have another issue: OpenAIBot: There was a problem: undefined method `user_id' for nil:NilClass

1 Like

Hi, curious does this bot ingest the content of the discourse instance?

1 Like

No, token limits preclude that and we are not training a model here. We are just prompting the LLM with the last x Posts within the same Topic.

5 Likes

It seems to work better in chat as well, but not as great on Topics/Posts

2 Likes

Do I have to pay to use the bot on my forum?

2 Likes