mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 12:47:28 +08:00
update plugins doc (#1305)
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
# 简介
|
||||
---
|
||||
title: AI 提示词模版
|
||||
keywords: [ AI网关, AI提示词模版 ]
|
||||
description: AI 提示词模版配置参考
|
||||
---
|
||||
|
||||
## 功能说明
|
||||
|
||||
AI提示词模板,用于快速构建同类型的AI请求。
|
||||
|
||||
# 配置说明
|
||||
## 运行属性
|
||||
|
||||
插件执行阶段:`默认阶段`
|
||||
插件执行优先级:`500`
|
||||
|
||||
## 配置说明
|
||||
| 名称 | 数据类型 | 填写要求 | 默认值 | 描述 |
|
||||
|----------------|-----------------|------|-----|----------------------------------|
|
||||
| `templates` | array of object | 必填 | - | 模板设置 |
|
||||
@@ -45,4 +57,4 @@ templates:
|
||||
"language": "python"
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
53
plugins/wasm-go/extensions/ai-prompt-template/README_EN.md
Normal file
53
plugins/wasm-go/extensions/ai-prompt-template/README_EN.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: AI Prompt Template
|
||||
keywords: [ AI Gateway, AI Prompt Template ]
|
||||
description: AI Prompt Template Configuration Reference
|
||||
---
|
||||
## Function Description
|
||||
AI prompt templates are used to quickly build similar types of AI requests.
|
||||
|
||||
## Execution Properties
|
||||
Plugin Execution Phase: `Default Phase`
|
||||
Plugin Execution Priority: `500`
|
||||
|
||||
## Configuration Description
|
||||
| Name | Data Type | Required | Default Value | Description |
|
||||
|-----------------|-------------------|----------|---------------|-----------------------------------|
|
||||
| `templates` | array of object | Required | - | Template settings |
|
||||
|
||||
Template object configuration description:
|
||||
| Name | Data Type | Required | Default Value | Description |
|
||||
|-----------------------|-------------------|----------|---------------|-----------------------------------|
|
||||
| `name` | string | Required | - | Template name |
|
||||
| `template.model` | string | Required | - | Model name |
|
||||
| `template.messages` | array of object | Required | - | Input for large model |
|
||||
|
||||
Message object configuration description:
|
||||
| Name | Data Type | Required | Default Value | Description |
|
||||
|----------------|-------------------|----------|---------------|-----------------------------------|
|
||||
| `role` | string | Required | - | Role |
|
||||
| `content` | string | Required | - | Message |
|
||||
|
||||
Configuration example:
|
||||
```yaml
|
||||
templates:
|
||||
- name: "developer-chat"
|
||||
template:
|
||||
model: gpt-3.5-turbo
|
||||
messages:
|
||||
- role: system
|
||||
content: "You are a {{program}} expert, in {{language}} programming language."
|
||||
- role: user
|
||||
content: "Write me a {{program}} program."
|
||||
```
|
||||
|
||||
Example request body using the above configuration:
|
||||
```json
|
||||
{
|
||||
"template": "developer-chat",
|
||||
"properties": {
|
||||
"program": "quick sort",
|
||||
"language": "python"
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user