Copilot commented on code in PR #12917: URL: https://github.com/apache/apisix/pull/12917#discussion_r2720458570
########## docs/zh/latest/plugins/ai-prompt-decorator.md: ########## @@ -5,7 +5,7 @@ keywords: - API 网关 - Plugin - ai-prompt-decorator -description: 本文档包含有关 Apache APISIX ai-prompt-decorator 插件的信息。 +description: ai-prompt-decorator 插件插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。 Review Comment: The description contains a duplicate word "插件插件" (plugin plugin). The first occurrence should be removed. ```suggestion description: ai-prompt-decorator 插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。 ``` ########## docs/zh/latest/plugins/ai-prompt-decorator.md: ########## @@ -27,83 +27,109 @@ description: 本文档包含有关 Apache APISIX ai-prompt-decorator 插件的 # --> +<head> + <link rel="canonical" href="https://docs.api7.ai/hub/ai-prompt-decorator" /> +</head> + ## 描述 -`ai-prompt-decorator` 插件通过在请求中追加或前置提示,简化了对 LLM 提供商(如 OpenAI 和 Anthropic)及其模型的访问。 +`ai-prompt-decorator` 插件简化了对 OpenAI、Anthropic 等大语言模型提供商及其模型的访问。它通过在前缀和后缀附加预先设计的提示词来修饰用户输入的提示,从而为内容生成设置上下文。这种做法有助于模型在交互过程中按照期望的指导原则运行。 ## 插件属性 -| **字段** | **必选项** | **类型** | **描述** | +| **字段** | **是否必填** | **类型** | **描述** | | ----------------- | --------------- | -------- | -------------------------------------------- | -| `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 | 需要前置添加的提示对象数组。组。 | Review Comment: There's a typo in the Chinese text. "组。" appears to be duplicated or incorrectly placed at the end of the sentence. The text should read "需要前置添加的提示对象数组。" without the extra "组。" ```suggestion | `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。 | ``` -- 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]
