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.