# AI Prompt Decorator 配置选项

ai-prompt-decorator 插件通过在发送给 LLM 的用户提示词前后添加预设提示词，简化 API 操作和内容生成。<!-- --> <!-- -->配置涵盖插件参数。

## 参数[​](#参数 "参数的直接链接")

有关所有插件均可使用的配置项，请参阅[插件通用配置](https://docs.apiseven.com/apisix/reference/plugin-common-configurations.md)。

* prepend

  array\[object]

  ***

  要前置的提示词数组。

  必须至少配置 `prepend` 或 `append` 中的一个。

  * role

    string

    必填

    有效值：

    `system`、`user` 或 `assistant`

    ***

    消息角色。

  * content

    string

    必填

    ***

    消息内容（提示词）。

* append

  array\[object]

  ***

  要追加的提示词数组。

  必须至少配置 `prepend` 或 `append` 中的一个。

  * role

    string

    必填

    有效值：

    `system`、`user` 或 `assistant`

    ***

    消息角色。

  * content

    string

    必填

    ***

    消息内容（提示词）。

* max\_req\_body\_size

  integer

  默认值：`67108864`

  有效值：

  大于或等于 1

  ***

  缓冲到内存中的请求体最大字节数。超过该上限的请求体会在提示词装饰前以 HTTP 400 被拒绝。自 API7 企业版 3.9.17 和 3.10.4，以及 APISIX 3.18.0 起可用。
