# Ai自定义提示如何给用户使用

**URL:** https://meta.discourse.org/t/ai/380852
**Category:** Bug
**Tags:** ai, ai-helper
**Created:** [2025年八月29日 03:02 UTC](https://meta.discourse.org/t/ai/380852 "2025-08-29T03:02:48Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2025年八月29日 15:02 UTC](https://meta.discourse.org/t/ai/380852/9 "2025-08-29T15:02:01Z")

</div>

抱歉，有什么事情打断了我。但在此之前，我有一个临时的解决方法：

您可以在 Rails 控制台中编辑隐藏的站点设置，以确定谁可以使用自定义提示（[https://meta.discourse.org/t/using-hidden-site-settings/308773）。](https://meta.discourse.org/t/using-hidden-site-settings/308773%EF%BC%89%E3%80%82)

```plaintext
SiteSetting.ai_helper_custom_prompts_allowed_groups = 10

```

10 是信任级别 0 组的 ID。

该设置已弃用，但我的印象是前端仍然使用它来决定是否显示自定义提示。

如果 `can_use_custom_prompts` 为 false，则会从助手选项中删除 `custom_prompt`：

> <https://github.com/discourse/discourse/blob/19acdbe3d92db752b8dffcb5d59a3b5204ac4c1e/plugins/discourse-ai/assets/javascripts/discourse/components/ai-composer-helper-menu.gjs#L69-L71>

而这基于：

> <https://github.com/discourse/discourse/blob/19acdbe3d92db752b8dffcb5d59a3b5204ac4c1e/plugins/discourse-ai/lib/ai_helper/entry_point.rb#L18-L20>

这是一个即将被移除的设置：

> <https://github.com/discourse/discourse/blob/a48661bddb48301a7b97c7f99f519046eba7a296/plugins/discourse-ai/config/settings.yml#L118-L124>

我认为序列化器可能需要更新，以便根据自定义提示角色的配置而不是站点设置来工作。

---

_[View the full topic](https://meta.discourse.org/t/ai/380852)._
