Skip to content

docs: improve ai-prompt-decorator plugin docs#12917

Open
Yilialinn wants to merge 1 commit intomasterfrom
docs-improve-ai-prompt-decorator
Open

docs: improve ai-prompt-decorator plugin docs#12917
Yilialinn wants to merge 1 commit intomasterfrom
docs-improve-ai-prompt-decorator

Conversation

@Yilialinn
Copy link
Contributor

@Yilialinn Yilialinn commented Jan 16, 2026

Description

Improve the ai-prompt-decorator plugin doc and update the Chinese version accordingly.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. doc Documentation things labels Jan 16, 2026
@Baoyuantop Baoyuantop requested a review from Copilot January 23, 2026 09:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-proxy plugin
  • 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 操作和内容生成流程
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description contains a duplicate word "插件插件" (plugin plugin). The first occurrence should be removed.

Suggested change
description: ai-prompt-decorator 插件插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。
description: ai-prompt-decorator 插件通过前缀和后缀附加预先设计的提示词来装饰用户向大语言模型提交的提示,从而简化 API 操作和内容生成流程。

Copilot uses AI. Check for mistakes.
| `append` | 条件必选\* | Array | 要追加的提示对象数组 |
| `append.role` | 是 | String | 消息的角色(`system`、`user`、`assistant`) |
| `append.content` | 是 | String | 消息的内容。最小长度:1 |
| `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。组。 |
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 "组。"

Suggested change
| `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。组。 |
| `prepend` | 条件性必填\* | Array | 需要前置添加的提示对象数组。 |

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Documentation things size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants