docs: improve ai-prompt-decorator plugin docs#12917
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request improves the documentation for the ai-prompt-decorator plugin in both English and Chinese versions. The changes enhance clarity and provide better examples for users.
Changes:
- Updated plugin descriptions to better explain functionality and purpose
- Refined attribute table with clearer field descriptions and examples
- Added comprehensive examples showing integration with
ai-proxyplugin - Replaced theoretical request body modifications with actual API response examples
- Added canonical links to external documentation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/en/latest/plugins/ai-prompt-decorator.md | Enhanced description, updated attribute table with clearer examples, added comprehensive working example with ai-proxy integration and actual API responses |
| docs/zh/latest/plugins/ai-prompt-decorator.md | Chinese translation of the English version improvements, maintaining consistency with English content |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Plugin | ||
| - ai-prompt-decorator | ||
| description: 本文档包含有关 Apache APISIX ai-prompt-decorator 插件的信息。 | ||
| description: ai-prompt-decorator 插件插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。 |
There was a problem hiding this comment.
The description contains a duplicate word "插件插件" (plugin plugin). The first occurrence should be removed.
| description: ai-prompt-decorator 插件插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。 | |
| description: ai-prompt-decorator 插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。 |
| | `append` | 条件必选\* | Array | 要追加的提示对象数组 | | ||
| | `append.role` | 是 | String | 消息的角色(`system`、`user`、`assistant`) | | ||
| | `append.content` | 是 | String | 消息的内容。最小长度:1 | | ||
| | `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。组。 | |
There was a problem hiding this 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 "组。"
| | `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。组。 | | |
| | `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。 | |
Description
Improve the
ai-prompt-decoratorplugin doc and update the Chinese version accordingly.Checklist