update plugins doc (#1305)

This commit is contained in:
澄潭
2024-09-12 21:48:40 +08:00
committed by GitHub
parent 0f9113ed82
commit c7c4ae1da2
80 changed files with 7373 additions and 2368 deletions

View File

@@ -1,7 +1,19 @@
# 简介
AI提示词装饰器插件支持在LLM的请求前后插入prompt。
---
title: AI 提示词
keywords: [ AI网关, AI提示词 ]
description: AI 提示词插件配置参考
---
# 配置说明
## 功能说明
AI提示词插件支持在LLM的请求前后插入prompt。
## 运行属性
插件执行阶段:`默认阶段`
插件执行优先级:`450`
## 配置说明
| 名称 | 数据类型 | 填写要求 | 默认值 | 描述 |
|----------------|-----------------|------|-----|----------------------------------|
@@ -15,7 +27,7 @@ message object 配置说明:
| `role` | string | 必填 | - | 角色 |
| `content` | string | 必填 | - | 消息 |
# 示例
## 示例
配置示例如下:
@@ -69,7 +81,7 @@ curl http://localhost/test \
```
# 基于geo-ip插件的能力扩展AI提示词装饰器插件携带用户地理位置信息
## 基于geo-ip插件的能力扩展AI提示词装饰器插件携带用户地理位置信息
如果需要在LLM的请求前后加入用户地理位置信息请确保同时开启geo-ip插件和AI提示词装饰器插件。并且在相同的请求处理阶段里geo-ip插件的优先级必须高于AI提示词装饰器插件。首先geo-ip插件会根据用户ip计算出用户的地理位置信息然后通过请求属性传递给后续插件。比如在默认阶段里geo-ip插件的priority配置1000ai-prompt-decorator插件的priority配置500。
geo-ip插件配置示例