Copilot commented on code in PR #13204:
URL: https://github.com/apache/apisix/pull/13204#discussion_r3076969150


##########
docs/zh/latest/plugins/ai-prompt-template.md:
##########
@@ -31,43 +31,60 @@ description: ai-prompt-template 插件支持预先配置提示词模板,这些
   <link rel="canonical" href="https://docs.api7.ai/hub/ai-prompt-template"; />
 </head>
 
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
 ## 描述
 
-`ai-prompt-template` 插件简化了对 OpenAI、Anthropic 
等大语言模型提供商及其模型的访问。它预先配置提示词模板,这些模板仅接受用户在指定的模板变量中输入,采用“填空”的方式。
+`ai-prompt-template` 插件支持预先配置提示词模板,这些模板仅接受用户在指定的模板变量中输入,采用"填空"的方式。它简化了对 
OpenAI、Anthropic 等大语言模型提供商及其模型的访问,让你可以定义可复用的提示词结构。
 
 ## 插件属性
 
 | **字段** | **是否必填** | **类型** | **描述** |
-| :--- | :--- | :--- | :--- |
-| `templates` | 是 | Array | 模板对象数组。 |
-| `templates.name` | 是 | String | 模板的名称。在请求路由时,请求中应包含与所配置模板相对应的模板名称。 |
-| `templates.template` | 是 | Object | 模板规范。 |
-| `templates.template.model` | 是 | String | AI 模型的名称,例如 `gpt-4` 或 
`gpt-3.5`。更多可用模型请参阅 LLM 提供商的 API 文档。 |
-| `templates.template.messages` | 是 | Array | 模板消息规范。 |
-| `templates.template.messages.role` | 是 | String | 消息的角色,例如 `system`、`user` 或 
`assistant`。 |
-| `templates.template.messages.content` | 是 | String | 消息(提示词)的内容。 |
+| --- | --- | --- | --- |
+| `templates` | True | array | 模板对象数组。 |
+| `templates.name` | True | string | 模板的名称。在请求路由时,请求中应包含与所配置模板相对应的模板名称。 |
+| `templates.template` | True | object | 模板规范。 |
+| `templates.template.model` | False | string | LLM 模型的名称,例如 `gpt-4` 或 
`gpt-3.5`。更多可用模型请参阅 LLM 提供商的 API 文档。 |
+| `templates.template.messages` | False | array[object] | 模板消息规范。 |
+| `templates.template.messages.role` | True | string | 消息的角色。有效值为 
`system`、`user` 和 `assistant`。 |
+| `templates.template.messages.content` | True | string | 消息(提示词)的内容。使用 
`{{variable_name}}` 语法定义模板变量,这些变量将从请求体中填充。 |

Review Comment:
   该表格的“是否必填”列使用了英文布尔值 `True/False`,与中文文档其它插件属性表常用的“是/否”不一致,也会影响可读性。建议将 
`True/False` 统一改为 `是/否`(并保持该列为中文表达)。
   ```suggestion
   | `templates` | 是 | array | 模板对象数组。 |
   | `templates.name` | 是 | string | 模板的名称。在请求路由时,请求中应包含与所配置模板相对应的模板名称。 |
   | `templates.template` | 是 | object | 模板规范。 |
   | `templates.template.model` | 否 | string | LLM 模型的名称,例如 `gpt-4` 或 
`gpt-3.5`。更多可用模型请参阅 LLM 提供商的 API 文档。 |
   | `templates.template.messages` | 否 | array[object] | 模板消息规范。 |
   | `templates.template.messages.role` | 是 | string | 消息的角色。有效值为 
`system`、`user` 和 `assistant`。 |
   | `templates.template.messages.content` | 是 | string | 消息(提示词)的内容。使用 
`{{variable_name}}` 语法定义模板变量,这些变量将从请求体中填充。 |
   ```



##########
docs/en/latest/plugins/ai-prompt-template.md:
##########
@@ -31,43 +31,60 @@ description: The ai-prompt-template plugin supports 
pre-configuring prompt templ
   <link rel="canonical" href="https://docs.api7.ai/hub/ai-prompt-template"; />
 </head>
 
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
 ## Description
 
-The `ai-prompt-template` Plugin simplifies access to LLM providers, such as 
OpenAI and Anthropic, and their models. It pre-configures prompt templates that 
only accept user inputs in designated template variables, in a "fill in the 
blank" fashion.
+The `ai-prompt-template` Plugin supports pre-configuring prompt templates that 
only accept user inputs in designated template variables, in a "fill in the 
blank" fashion. It simplifies access to LLM providers, such as OpenAI and 
Anthropic, by letting you define reusable prompt structures.
 
 ## Plugin Attributes
 
 | **Field** | **Required** | **Type** | **Description** |
-| :--- | :--- | :--- | :--- |
-| `templates` | Yes | Array | An array of template objects. |
-| `templates.name` | Yes | String | Name of the template. When requesting the 
route, the request should include the template name that corresponds to the 
configured template. |
-| `templates.template` | Yes | Object | Template specification. |
-| `templates.template.model` | Yes | String | Name of the AI Model, such as 
`gpt-4` or `gpt-3.5`. See your LLM provider API documentation for more 
available models. |
-| `templates.template.messages` | Yes | Array | Template message 
specification. |
-| `templates.template.messages.role` | Yes | String | Role of the message, 
such as `system`, `user`, or `assistant`. |
-| `templates.template.messages.content` | Yes | String | Content of the 
message (prompt). |
+| --- | --- | --- | --- |
+| `templates` | True | array | An array of template objects. |
+| `templates.name` | True | string | Name of the template. When requesting the 
Route, the request should include the template name that corresponds to the 
configured template. |
+| `templates.template` | True | object | Template specification. |
+| `templates.template.model` | False | string | Name of the LLM model, such as 
`gpt-4` or `gpt-3.5`. See your LLM provider API documentation for more 
available models. |
+| `templates.template.messages` | False | array[object] | Template message 
specification. |
+| `templates.template.messages.role` | True | string | Role of the message. 
Valid values are `system`, `user`, and `assistant`. |
+| `templates.template.messages.content` | True | string | Content of the 
message (prompt). Use `{{variable_name}}` syntax to define template variables 
that will be filled from the request body. |

Review Comment:
   In the Plugin Attributes table, the `Required` column switched from `Yes/No` 
to `True/False`, and type values changed to lowercase (`array`, `string`, 
etc.). Most plugin docs still use `Yes/No` and capitalized types (`Array`, 
`String`, `Object`), so this introduces inconsistency in the docs set. Suggest 
aligning this table’s `Required`/`Type` formatting with the prevailing 
plugin-doc convention (or applying the same convention consistently across ai-* 
plugin docs).
   ```suggestion
   | `templates` | Yes | Array | An array of template objects. |
   | `templates.name` | Yes | String | Name of the template. When requesting 
the Route, the request should include the template name that corresponds to the 
configured template. |
   | `templates.template` | Yes | Object | Template specification. |
   | `templates.template.model` | No | String | Name of the LLM model, such as 
`gpt-4` or `gpt-3.5`. See your LLM provider API documentation for more 
available models. |
   | `templates.template.messages` | No | Array[Object] | Template message 
specification. |
   | `templates.template.messages.role` | Yes | String | Role of the message. 
Valid values are `system`, `user`, and `assistant`. |
   | `templates.template.messages.content` | Yes | String | Content of the 
message (prompt). Use `{{variable_name}}` syntax to define template variables 
that will be filled from the request body. |
   ```



-- 
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]

Reply via email to