# AI提示中使用的所有变量完整列表

**URL:** https://meta.discourse.org/t/the-complete-list-of-variables-used-in-ai-prompts/364841
**Category:** Support
**Tags:** ai
**Created:** [2025 年5 月 5 日 14:12 UTC](https://meta.discourse.org/t/the-complete-list-of-variables-used-in-ai-prompts/364841 "2025-05-05T14:12:30Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### 作者： ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### 发布日期： [2025 年5 月 5 日 14:37 UTC](https://meta.discourse.org/t/the-complete-list-of-variables-used-in-ai-prompts/364841/3 "2025-05-05T14:37:40Z")

</div>

> [@wlandgraf](#):
>
> 第一个问题：是否有像 `resource_url` 这样的变量的综合列表？

鉴于提示自定义项目尚未发布，我们目前还没有这样的东西。我们正在将所有功能迁移到 personas，以便它们可以自定义提示，因此当它发布时，我们可以创建一个 #Documentation 主题来列出所有选项。

> [@wlandgraf](#):
>
> 第二个问题：这是指特定主题数据的引用方式吗？例如，如果我想在提示中说“搜索论坛时，只考虑已解决和已关闭的主题”。完成此操作的最佳方法是什么？

如果您的 persona 可以访问 `search` 工具，它可以在搜索时使用 `closed` 状态，请参阅

> <https://github.com/discourse/discourse-ai/blob/main/lib/personas/tools/search.rb#L66-L69>

> [@wlandgraf](#):
>
> 第三个问题（与第二个相关）：这也是一种表达“考虑 #Support 类别中的主题”之类内容的方法吗？

这应该也可以，请参阅

> <https://github.com/discourse/discourse-ai/blob/main/lib/personas/tools/search.rb#L54>

> [@wlandgraf](#):
>
> 第四个问题：如果第三个问题中描述的内容是可能的，那么为什么有一个明确的“Base Search Query”字段？它到底有什么用，如何使用？

这是一种将条件附加到搜索的方法，并使用您在 Discourse 中的 `/search` 页面上会使用的相同语法。在您的示例中，它将是

```plaintext
#support status:solved

```

---

_[View the full topic](https://meta.discourse.org/t/the-complete-list-of-variables-used-in-ai-prompts/364841)._
