This topic covers the configuration of AI Bot feature of the Discourse AI plugin.
Overview
The AI Bot is a chatbot that allows for direct integration with generative AI powered by OpenAI (ChatGPT), Anthropic (Claude), Stability AI (Stable Diffusion) and others!
Features
- Ability to pick the specific AI Bot persona you want to interact with
- Flexibility around which Large Language Model (LLM) provider you can use (Anthropic/Open AI)
- Multiple people can interact with the AI Bot at the same time in the same UI
- Automatically titles private messages (PMs) with the AI Bot
- Replies are generated continuously through streaming and can be stopped at any time
- Enable bot for a specific subset of users
Personas
Full guide to personas is at: Discourse AI Persona Guide
AI bot now supports custom AI personas with upload support
Depending on the help you need, you have several different “personas” to choose from. These personas are preset and predefined, users can pick any of the personas before chatting with AI Bot. These personas are designed to best serve the needs of your community and help you get the best answer to your questions…
- Forum Helper: General purpose AI bot capable of performing various tasks. Can search your current Discourse instance and use that information to build responses
- i.e - What are the top posts for AI?
- SQL Helper: AI Bot specialized in helping craft SQL queries on this Discourse Instance (aware of your current DB schema)
- i.e - Write me a query to find all the AI bot messages by a specific customer/user
- Artist: AI Bot specialized in generating images. Need a Stable Diffusion API key
- i.e - Draw me a picture of a cat
- Settings Explorer: AI Bot specialized in helping explore Discourse site settings. (aware of Discourse source code)
- i.e - How do I enable Discourse AI on my Discourse site?
- Researcher: AI Bot with Google access and the ability to browse web pages to research information for you. Need a Google Custom Search API key
- i.e - How many legs does a dinosaur have?
- Creative: AI Bot without any external integrations
- i.e - Come up with 5 ideas to improve community engagement
- GitHub Helper: AI Bot specializing in researching GitHub repositories
- i.e - What doe LINK_TO_PR do?
Availability
Hosted by us? Currently, this module is available for all hosted by Discourse customers on any plan.
It comes pre-installed on most plans, and if you’re an Enterprise customer you can contact us to have it added to your site on request.
Self-hosted users can install the plugin anytime by following Install Plugins in Discourse - sysadmin - Discourse Meta
Enabling AI Bot
Prerequisites
-
Must configure at least one provider for Large Language Model (LLM), from the options below:
- OpenAI
- Anthropic
- Azure OpenAI
- AWS Bedrock with Anthropic access
- HuggingFace Endpoints with Llama2-like model
- Self-Hosting an OpenSource LLM
- Google Gemini
- Cohere
-
Optionally, configure the following to get extra features:
- Stable Diffusion → Generate images
- Google Custom Search → Search the internet for answers through Google
- Embeddings → Improved search through Semantic Search
Configuration
- Go to
Admin
settings->Plugins
→ search or finddiscourse-ai
and make sure its enabled - Checkmark
ai_bot_enabled
to enable AI Bot - Pick the group of users through
ai_bot_allowed_groups
to allow specific access to the AI Bot. - Select the Large Language Model (LLM) model you would like to use
ai_bot_enabled_chatbots
, by default itsGPT-3.5-turbo
but you can also pickGPT-4
and/orClaude-2
Technical FAQ
- Why am I seeing bot users such as
claude_bot
,gpt3.5_bot
andgpt4_bot
being added as admins to my site?- These users are necessary for AI Bot to function. They don’t do anything in the background and are only used when interacting with the bot.
- Where do I edit personas?
- Head to
/admin/plugins/discourse-ai/ai_personas
you can control which personas are enabled and who gets access to each persona.
- Head to
- Is the AI Bot trained on my community data?
- The AI Bot is not trained on any data. It uses Retrieval-augmented generation (RAG) technique to get results.
Caveats
- The bot is an area of much experimentation and is changing rapidly
- The bot does not always provide 100% accurate results
- We recommend enabling the bot for specific user groups to help control costs, as 3rd party providers charge on a per usage basis