Discourse 聊天机器人 🤖

:information_source: 摘要 Discourse 的原创 AI 聊天机器人
:hammer_and_wrench: 仓库链接 GitHub - merefield/discourse-chatbot: An AI bot with RAG capability for Topics, Chat & Customer Support in Discourse, currently powered by OpenAI · GitHub
:open_book: 安装指南 如何在 Discourse 中安装插件
:heart: 赞助 请考虑成为我开源工作的长期赞助商,选择一个适合您或您组织资源和需求的级别,以确保该插件获得应有的维护,并继续为您的站点提供服务。

喜欢这个插件吗?请在 GitHub 上给它一个 :star: 吧! :pray:

:information_source: 由于这是一个独立贡献的插件,请在此主题中提出支持、错误、用户体验和功能请求。注意:该插件提供在 Discourse.org 托管服务上。如果您是自托管用户,或者可能是在第三方托管上(但请咨询您的提供商),则可以安装它。

Discourse 的原创 AI 聊天机器人

Chatbot 为话题(Topics)、个人消息(Personal Messages)、聊天频道(Chat channels)和聊天线程(Chat threads)带来可配置的 AI 对话。您可以为机器人设定一个适合您社区的角色,决定哪些群组可以使用它,并为低信任度、中信任度和高信任度用户选择不同的模型和工具。

它可以:

  • 根据当前对话正常回答;
  • 使用语义搜索或混合搜索检索选定的论坛内容;
  • 搜索维基百科、当前新闻和网络;
  • 爬取远程页面并获取当日收盘市场数据;
  • 执行可靠的基于表达式的计算;
  • 查看上传的图片,并可选择读取 PDF;
  • 生成和编辑图片;
  • 在私人对话中收集未填写的可编辑用户字段(User Fields);
  • 将私人聊天对话升级至已配置的员工群组;
  • 自动回复选定类别中的新话题;以及
  • 接受由其他插件提供的额外工具。

有关实用的支持工作流程,请参阅 构建技术支持聊天机器人

启用本地论坛搜索后,机器人可以基于您社区的内容来回答:

对于更简单的对话,可以暴露更少的工具或根本不暴露工具,以减少调用、延迟和成本:

提供商支持

您可以独立地为回复、嵌入(embeddings)、视觉(vision)和图片生成选择提供商。每种能力都复用其选定提供商所属的 API 密钥。

能力 OpenAI Anthropic Google Gemini xAI
LLM 回复和工具 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
嵌入 :white_check_mark: :white_check_mark: :white_check_mark:
视觉 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
图片生成 :white_check_mark: :white_check_mark: :white_check_mark:
图片编辑 GPT Image 模型 :white_check_mark:
PDF 对话输入 :white_check_mark:

如果未设置自定义 URL,Chatbot 将使用所选提供商的内置官方端点。自定义模型名称和 URL 支持 Azure OpenAI、Ollama、代理以及实现受支持提供商 API 形状的其他服务。

仅当该提供商处于活动状态时,才会显示特定提供商的模型下拉菜单。回复模型可以因信任级别而异,而嵌入、视觉和图片生成各自拥有自己的提供商和模型选择器。

阅读完整的提供商和自定义端点指南

OpenAI 快速示例

  1. 创建一个 OpenAI API 密钥 并确保已启用 API 计费。
  2. chatbot_llm_provider 设置为 OpenAI,并将密钥粘贴到 chatbot_open_ai_token 中。
  3. 保持自定义 URL 为空,为每个您打算使用的信任级别选择一个 OpenAI 模型,并将您的测试群组添加到相应的 Chatbot 访问设置中。
  4. 在允许的话题、个人消息或聊天中提及机器人以进行测试。

访问权限、配额和工具

在您将群组分配到 Chatbot 的低、中或高信任度群组设置之前,没有人拥有访问权限。用户将继承其最高匹配 Chatbot 信任级别的配额、模型和工具允许列表。配额可以按查询次数或令牌数来衡量。

内置工具针对每个信任级别独立选择。凭据和辅助设置仍然控制运行时可用性,因此选择网络工具但未提供其 API 密钥不会暴露该工具。

阅读有关访问权限和配额以及信任级别工具的文档。

本地论坛搜索和隐私

:biohazard: 请在启用本地论坛搜索之前了解嵌入范围。

默认的 benchmark_user 策略会对配置信任级别下适合用户可见的内容进行嵌入。categories 策略会对明确选定的类别中的内容进行嵌入。语义搜索针对速度进行了优化,不会为每个向机器人提问的人重复可见性检查,因此如果范围包含受限内容,匹配的内容可能会在原始受众之外共享。

个人消息永远不会被嵌入。请保持基准信任级别较低,除非其内容可以披露给每个 Chatbot 用户,否则避免使用私人类别,并从不应使用它的信任级别中移除 local_forum_search

所选提供商可能会接收对话内容、上传文件、嵌入搜索匹配项和工具结果。请审查其保留和数据使用条款,并在您的论坛条款和隐私声明中披露此处理过程。

阅读完整的嵌入、范围和隐私指南

快速入门

  1. 使用标准的自托管插件程序安装该插件。
  2. 选择 chatbot_llm_provider,输入该提供商的 API 密钥,并为每个信任级别选择模型。
  3. 将群组添加到低、中或高信任度访问设置中,并配置配额。
  4. 选择每个信任级别可用的内置工具。
  5. 如果您启用 local_forum_search,请配置其嵌入提供商并仔细审查其范围。
  6. 提及机器人、回复它、使用快速访问按钮或配置类别自动回复提示。

仓库 README 是前提条件、每个主要设置组、特定提供商行为、自定义端点、嵌入维护、提示自定义、调试、扩展开发和卸载的权威来源:

:books: 打开完整的 README

选定的 UI 功能

类别可以欢迎新话题,并要求机器人搜索相关的社区内容:

可选的快速访问按钮可以打开与机器人的直接聊天或个人消息:

用户字段工具可以在私人对话中收集受支持的空白字段:

User Fields collection

支持和赞助

请在此 Meta 主题中报告支持请求、错误、用户体验反馈和功能创意。请包含提供商、模型名称、相关设置、HTTP 状态和提供商响应体,同时移除 API 密钥和私人内容。

这项工作依赖于社区支持。如果该插件对您的站点有价值,请赞助其持续维护

项目赞助商

赞助商 级别 网站
Surety Silver Plus suretyhome.com

免责声明

LLM 可能会产生令人信服但错误的输出。请针对您社区的需求测试该插件,了解隐私和成本影响,并应用适当的审核。生成输出的条款因提供商和司法管辖区而异;请审查您启用的每个提供商的条款。

104 个赞
Building a technical support chatbot
Answer feature
Webhooks on chat messages?
How to check what prevents rake migrate?
Weekly Summary of AI topics
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Interact with discourse from Python?
Sidekiq not working
Locations Plugin :earth_africa:
Lessons from Colossal Caves
Issue after Rebuilding Discourse on Digital Ocean Droplet
Locations Plugin :earth_africa:
I have error when upgrade new version of discourse
I have error when upgrade new version of discourse
Site down after upgrade via SSH - how to fix?
2023: The Year in Review
Character count when writing description
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Is there an option to use Discourse Chat as a customer service type of chat?
Configure AI Chatbot for Trust Level 0 Access
Creating bot on discourse
AI Helper Plugin
Copy custom file in discourse container while build
Voice to text integration
Allow specifiy user different from guardian.user in chat services such as Chat::CreateMessage
How to add a ChatGPT trained AI to discourse?
Cannot get the js in my component to compile SyntaxError: Private field must be used in an enclosing class
Allow ChatBot to read PDFs so it can join in a group discussion
How to create a custom ChatGPT based bot?
Discourse and Coveo
Link for new DM / personal chat message with pre-filled information
UX IPhone issues
How to respond to automatic topics with AI
Comparison between discourse-ai AI Bot and merefield/discourse-chatbot
Allow multiple ‘new topic’ drafts
I have error when upgrade the latest discourse
Two different answers from gpt4o - one right, one wrong.. !?
Is the shortcut to start AI conversation a user setting or not?
Setting Form Templates with a tag
Recommendation: chatbot to support discussion in threads
Photography Mentor Bot
Grouped Site Settings under Headings in Plugins
Update Not Completed and Discourse not opening
Recommendation: chatbot to support discussion in threads
Discourse AI Topic Summary :robot:
Discourse AI Topic Summary :robot:
Hubot Adapter for Discourse
Hubot Adapter for Discourse
Verbose log
Making the case for a hard cap feature on user group AI usage for AI bots and AI Helper
LLMs and the impact on customer support
2024: The Year in Review
How to respond to automatic topics with AI
What User Information is Exposed to LLMs in Discourse AI
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Configure AI Chatbot for Trust Level 0 Access
Auto responder using AI
Locations Plugin :earth_africa:
Discourse AI Topic Summary :robot:
Discourse Chat Bridge (Telegram)
AI personas integration of the chat plugin: It would be great if site users could chat with AI personas
What's the best way to store data with a plugin?
Locations Plugin :earth_africa:
Locations Plugin :earth_africa:
Is there any built-in chatbot or conversational assistant available in Discourse?
ChatGPT Assistant Integration
Create posts with AI
Multisite vs multiple containers
Training a model on a site's posts?
How are we all feeling about ChatGPT and other LLMs and how they'll impact forums?
GPT-4 with vision available
Use AI to request summary and others things from topic
Upgrading from /admin/upgrade takes *very* long
Embed additional explainer text in Form Template
We need prompt chains: Allow custom AI persona tools to access LangChain.js and/or longer execution time
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Configure AI Chatbot for Trust Level 0 Access
Enabling AI Bot in Chat
When I start a conversation with the AI, it gives two answers to my question
Balancing Costs and Functionality in AI-Powered Forums
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)