kayx23 commented on code in PR #13206: URL: https://github.com/apache/apisix/pull/13206#discussion_r3084444905
########## docs/zh/latest/plugins/ai-prompt-decorator.md: ########## @@ -27,83 +27,264 @@ description: 本文档包含有关 Apache APISIX ai-prompt-decorator 插件的 # --> +<head> + <link rel="canonical" href="https://docs.api7.ai/hub/ai-prompt-decorator" /> +</head> + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + ## 描述 -`ai-prompt-decorator` 插件通过在请求中追加或前置提示,简化了对 LLM 提供商(如 OpenAI 和 Anthropic)及其模型的访问。 +`ai-prompt-decorator` 插件通过在用户输入提示前后添加预设提示来修改用户输入,以在内容生成中设定上下文。这种做法有助于模型在交互过程中按照预期的指导方针运行。 ## 插件属性 -| **字段** | **必选项** | **类型** | **描述** | -| ----------------- | --------------- | -------- | -------------------------------------------- | -| `prepend` | 条件必选\* | Array | 要前置的提示对象数组 | -| `prepend.role` | 是 | String | 消息的角色(`system`、`user`、`assistant`) | -| `prepend.content` | 是 | String | 消息的内容。最小长度:1 | -| `append` | 条件必选\* | Array | 要追加的提示对象数组 | -| `append.role` | 是 | String | 消息的角色(`system`、`user`、`assistant`) | -| `append.content` | 是 | String | 消息的内容。最小长度:1 | +| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 | +| --- | --- | --- | --- | --- | --- | +| `prepend` | array | 条件必选\* | | | 要前置的提示对象数组。 | +| `prepend.role` | string | 是 | | [`system`, `user`, `assistant`] | 消息的角色。 | +| `prepend.content` | string | 是 | | `length >= 1` | 消息的内容(提示)。 | Review Comment: ```suggestion | `prepend.content` | string | 是 | | 长度 >= 1 | 消息的内容(提示)。 | ``` ########## docs/zh/latest/plugins/ai-prompt-decorator.md: ########## @@ -27,83 +27,264 @@ description: 本文档包含有关 Apache APISIX ai-prompt-decorator 插件的 # --> +<head> + <link rel="canonical" href="https://docs.api7.ai/hub/ai-prompt-decorator" /> +</head> + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + ## 描述 -`ai-prompt-decorator` 插件通过在请求中追加或前置提示,简化了对 LLM 提供商(如 OpenAI 和 Anthropic)及其模型的访问。 +`ai-prompt-decorator` 插件通过在用户输入提示前后添加预设提示来修改用户输入,以在内容生成中设定上下文。这种做法有助于模型在交互过程中按照预期的指导方针运行。 ## 插件属性 -| **字段** | **必选项** | **类型** | **描述** | -| ----------------- | --------------- | -------- | -------------------------------------------- | -| `prepend` | 条件必选\* | Array | 要前置的提示对象数组 | -| `prepend.role` | 是 | String | 消息的角色(`system`、`user`、`assistant`) | -| `prepend.content` | 是 | String | 消息的内容。最小长度:1 | -| `append` | 条件必选\* | Array | 要追加的提示对象数组 | -| `append.role` | 是 | String | 消息的角色(`system`、`user`、`assistant`) | -| `append.content` | 是 | String | 消息的内容。最小长度:1 | +| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 | +| --- | --- | --- | --- | --- | --- | +| `prepend` | array | 条件必选\* | | | 要前置的提示对象数组。 | +| `prepend.role` | string | 是 | | [`system`, `user`, `assistant`] | 消息的角色。 | +| `prepend.content` | string | 是 | | `length >= 1` | 消息的内容(提示)。 | +| `append` | array | 条件必选\* | | | 要追加的提示对象数组。 | +| `append.role` | string | 是 | | [`system`, `user`, `assistant`] | 消息的角色。 | +| `append.content` | string | 是 | | `length >= 1` | 消息的内容(提示)。 | Review Comment: ```suggestion | `append.content` | string | 是 | | 长度 >= 1 | 消息的内容(提示)。 | ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
