Discourse AI - AI Bot (chatbot - ChatGPT- Anthropic)

This topic covers the configuration of AI Bot module of the Discourse AI plugin.

Feature set

The AI Bot allows for direct integration with generative AI powered by either OpenAI or Anthropic.


  • Replies from bot stream and can be stopped mid generation
  • Automatically titles PMs
  • Multiple team members can interact with a chat session

GPT-4 features

  • When configured it can generate images using stable diffusion
  • When configured it can search using Google
  • Is able to search through public content on the forum


  • ai_bot_enabled_chatbots: list of bots to enable
  • ai_bot_enabled: to enable the plugin
  • ai_bot_allowed_groups: groups with access to the chat bot
  • ai_helper_add_ai_pm_to_header: add robot to the top of the page to initiate messages
  • ai_stability_api_key: (optional) stable diffusion api key
  • ai_google_custom_search_api_key: (optional) google custom search api key



The bot is an area of much experimentation and is changing rapidly.

Future work

  • Chat integration
  • Semantic search (currently uses traditional search)
  • Faster topic summaries


I don’t want perfect to be the enemy of good here.

I changed it so all the extra fancy stuff like search integration and image generation is only implemented on GPT 4 which is able to properly deal with the very complicated prompt.

I have some ideas on bringing these features to GPT 3.5 / Claude as well, but in the interim the basics are mighty useful on the simpler models.

  • Multiple people can interact with LLMs in a single session (something that is not possible in chat.openai.com)
  • Stuff streams like it does in the official UIs and can be cancelled.
  • We get access to our Markdown engine so you can get it to draw mermaid diagrams and other fancy things.

So this is very useful for general purpose tasks on the simpler models today.


Given the latest news from OpenAI I am delighted to now support GPT 3.5 with full bot capacity! (to be merged soon)

Sadly I still can not get anthropic to work in this department, techniques such as GitHub - microsoft/guidance: A guidance language for controlling large language models. may get it there, but it can get super expensive.


Hello, I am currently actively testing this plugin. Many questions (suggestions) arise. One of them:
I think it would be advisable to implement a quota system, as implemented in the chatbot plugin:

Otherwise, there is a risk of abuse of requests to artificial intelligence by both ordinary users and staff. I tried to limit requests in ChatGPT using the site settings to limit the number of topics /site_settings/category/rate_limits and private messages, but this applies to the entire forum as a whole, which is not the best solution, limiting normal communication between users. But, even when using the normal forum settings, there is no way to limit the number of posts in topics (via the Replay button function).

When introducing a quota system, I believe that it is necessary to provide for the possibility of differentiating quotas for public posts and personal messages.
Such an approach could serve as a vital instrument to spur users into engaging with the chatbot for private communication or alternatively, for interacting in the arena of public posts. By extension, this mechanism could be harnessed as a means to encourage our users to converse more copiously with the chatbot in the public sphere, thereby augmenting the expanse of the public knowledge base. The corollary of this strategy would be an enriched user experience in the utilisation of artificial intelligence.

Question 2:
How (in what settings) do I need to make changes to the plugin in order for Aibot to appear as an assistant for my site, for example, “I am an assistant for mysitename.com”. At this time, he introduces himself as the Discourse assistant, confusing users a little :sweat_smile:

Question 3:

What do I need to do so that Aibot suggests a title for a message (for a post) not in English but in my language, for example in Russian?

I tried to translate the built-in (hidden) prompts myself through the text settings /admin/customize/site_texts?q=, but I did not find such a prompt there.

1 Like