Yilialinn commented on code in PR #13206: URL: https://github.com/apache/apisix/pull/13206#discussion_r3084423117
########## docs/en/latest/plugins/ai-prompt-decorator.md: ########## @@ -27,83 +27,264 @@ description: This document contains information about the Apache APISIX ai-promp # --> +<head> + <link rel="canonical" href="https://docs.api7.ai/hub/ai-prompt-decorator" /> +</head> + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + ## Description -The `ai-prompt-decorator` plugin simplifies access to LLM providers, such as OpenAI and Anthropic, and their models by appending or prepending prompts into the request. +The `ai-prompt-decorator` Plugin modifies user input prompts by prefixing and appending pre-engineered prompts to set contexts in content generation. This practice helps the model operate within desired guidelines during interactions. ## Plugin Attributes -| **Field** | **Required** | **Type** | **Description** | -| ----------------- | --------------- | -------- | --------------------------------------------------- | -| `prepend` | Conditionally\* | Array | An array of prompt objects to be prepended | -| `prepend.role` | Yes | String | Role of the message (`system`, `user`, `assistant`) | -| `prepend.content` | Yes | String | Content of the message. Minimum length: 1 | -| `append` | Conditionally\* | Array | An array of prompt objects to be appended | -| `append.role` | Yes | String | Role of the message (`system`, `user`, `assistant`) | -| `append.content` | Yes | String | Content of the message. Minimum length: 1 | +| Name | Type | Required | Default | Valid values | Description | +| --- | --- | --- | --- | --- | --- | +| `prepend` | array | Conditionally\* | | | An array of prompt objects to be prepended. | +| `prepend.role` | string | True | | [`system`, `user`, `assistant`] | Role of the message. | +| `prepend.content` | string | True | | | Content of the message (prompt). Minimum length: 1. | +| `append` | array | Conditionally\* | | | An array of prompt objects to be appended. | +| `append.role` | string | True | | [`system`, `user`, `assistant`] | Role of the message. | +| `append.content` | string | True | | | Content of the message (prompt). Minimum length: 1. | Review Comment: fixed -- 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]
