# Discourse 如何启用 AI 模块

**URL:** <https://www.isharkfly.com/t/discourse-ai/15916>\
**Category:** Discourse\
**Tags:** discourse\
**Created:** [June 26, 2024, 7:37pm UTC](https://www.isharkfly.com/t/discourse-ai/15916 "2024-06-26T19:37:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [June 26, 2024, 7:37pm UTC](https://www.isharkfly.com/t/discourse-ai/15916/1 "2024-06-26T19:37:16Z")

</div>

在默认情况下，就算安装了 AI 的插件，Discourse 是默认不启动 AI 组件的。

可以在设置中选择：`ai bot enabled` 这个选项来启用 ai bot。

当启用成功后，就会在界面的最上端显示 AI bot 的选项了。

 ![2024-06-26_15-36-18](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/f/f6040a87c91325745dd7cbf65a358147eacbe6d5.png)

当前，这个得需要你有访问权限才行。

---

<div class="post-metadata">

**Author:** ![bird2580](https://www.isharkfly.com/user_avatar/www.isharkfly.com/bird2580/32/21782_2.png) [@bird2580](https://www.isharkfly.com/u/bird2580)\
**Post date:** [October 8, 2025, 8:54pm UTC](https://www.isharkfly.com/t/discourse-ai/15916/2 "2025-10-08T20:54:31Z")

</div>

请问如果国内服务器访问不了OPENAI的API怎么办，是否可以使用国内AI 😭

---

<div class="post-metadata">

**Author:** ![bird2580](https://www.isharkfly.com/user_avatar/www.isharkfly.com/bird2580/32/21782_2.png) [@bird2580](https://www.isharkfly.com/u/bird2580)\
**Post date:** [October 8, 2025, 8:58pm UTC](https://www.isharkfly.com/t/discourse-ai/15916/3 "2025-10-08T20:58:08Z")

</div>

> [@honeymoose](#):
>
> Discourse

我好像看见了

 ![QQ_1759957065332](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/f/0/f0d11cc71e262f13398f4d1edeac1a04a26bb811.png)

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [October 9, 2025, 10:16am UTC](https://www.isharkfly.com/t/discourse-ai/15916/4 "2025-10-09T10:16:55Z")

</div>

对的，使用 OpenAI 的提供者。

然后后面的 URL 写自己供应商的 URL。

比如 Deepseek 的 URL 是：

`https://api.deepseek.com/chat/completions`

后面的 Key 写你获得 Key 就行。

---

<div class="post-metadata">

**Author:** ![bird2580](https://www.isharkfly.com/user_avatar/www.isharkfly.com/bird2580/32/21782_2.png) [@bird2580](https://www.isharkfly.com/u/bird2580)\
**Post date:** [October 10, 2025, 8:47am UTC](https://www.isharkfly.com/t/discourse-ai/15916/5 "2025-10-10T08:47:57Z")

</div>

不知道为什么我使用了中转网关OpenAI 对话格式 但是在测试时候显示尝试联系模型时返回此错误：{“error”:{“code”:“”,“message”:“未提供令牌 (request id: 202510101644376342729984lRcVAQ7)”,“type”:“new\_api\_error”}}但是我确实填写了 **托管模型的服务的 API 密钥**

我的请求类似于

`curl ``https://你的newapi服务器地址/v1/chat/completions`` `  
`-H “Content-Type: application/json” `  
`-H “Authorization: Bearer $NEWAPI_API_KEY” `  
`-d ‘{`  
`“model”: “gpt-4.1”,`  
`“messages”: [`  
`{`  
`“role”: “developer”,`  
`“content”: “你是一个有帮助的助手。”`  
`},`  
`{`  
`“role”: “user”,`  
`“content”: “你好！”`  
`}`  
`]`  
`}’`

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [October 10, 2025, 10:49am UTC](https://www.isharkfly.com/t/discourse-ai/15916/8 "2025-10-10T10:49:53Z")

</div>

感觉还是你配置的问题。

我用了下我们的 DeepSeek 的配置，返回是没有问题的。

 ![2025-10-10_06-48-57](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/8/b/8b9859bb8a3cfa456af93afe111fd5c4da7d0890.jpeg)

但效果确实没有 GPT 和 Google 的 AI 好。

不过可能是负载比较小的原因，API 的调用返回速度很快，现在 GPT 调用返回速度很慢。

---

<div class="post-metadata">

**Author:** ![bird2580](https://www.isharkfly.com/user_avatar/www.isharkfly.com/bird2580/32/21782_2.png) [@bird2580](https://www.isharkfly.com/u/bird2580)\
**Post date:** [October 10, 2025, 10:50am UTC](https://www.isharkfly.com/t/discourse-ai/15916/9 "2025-10-10T10:50:48Z")

</div>

> 我成功了 我发现如果使用智普AI的API需要开启 启用回答 API（某些 OpenAI 模型需要）选项

 ![QQ_1760088380570](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/e/e/ee48cde71e271ef45a25c57ab894924fceb08a9a.jpeg)

我现在已经改成了DeepSeek模型的API 便宜量大

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [October 10, 2025, 10:52am UTC](https://www.isharkfly.com/t/discourse-ai/15916/10 "2025-10-10T10:52:59Z")

</div>

> [@bird2580](#):
>
> DeepSeek模型的API 便宜量大

基本上够用吧。

在一些其他的领域，我们还是用的 AI 模型。

AI 这东西，我感觉就是应付考试和一些已有的东西还是蛮方便的，有些题目不会做用 AI 大部分情况都能给到解释和正确答案。

但有时候还是有错的。
