Skip to content

Commit

Permalink
update plugins' spec (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlanni authored Sep 13, 2024
1 parent 648b451 commit 685a499
Show file tree
Hide file tree
Showing 37 changed files with 289 additions and 19 deletions.
28 changes: 27 additions & 1 deletion backend/sdk/src/main/resources/plugins/ai-agent/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: ai
name: ai-agent
title: AI Agent
Expand All @@ -13,8 +14,33 @@ info:
contact:
name: xingyunyang01
spec:
phase: AUTHN
phase: UNSPECIFIED_PHASE
priority: 20
routeConfigSchema:
openAPIV3Schema:
type: object
example:
llm:
apiKey: xxxxxxxxxxxxxxxxxx
domain: dashscope.aliyuncs.com
serviceName: dashscope.dns
servicePort: 443
path: /compatible-mode/v1/chat/completions
model: qwen-max-0403
maxIterations: 2
promptTemplate:
language: CH
apis:
- apiProvider:
domain: restapi.amap.com
serviceName: geo.dns
servicePort: 80
apiKey:
in: query
name: key
value: xxxxxxxxxxxxxxx
api: |
......
configSchema:
openAPIV3Schema:
type: object
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/ai-cache/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-cache
title: AI Cache
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: ai
name: ai-history
title: AI History
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/ai-intent/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-intent
title: AI Intent
Expand Down
42 changes: 42 additions & 0 deletions backend/sdk/src/main/resources/plugins/ai-json-resp/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: 1.0.0
info:
type: oss
category: ai
name: ai-json-resp
title: AI JSON Format
x-title-i18n:
zh-CN: AI JSON 格式化
description: LLM Response Structuring Plugin, designed to structure AI responses based on a default or user-configured JSON Schema, facilitating subsequent plugin processing. Note that currently, only non-streaming responses are supported.
x-description-i18n:
zh-CN: LLM响应结构化插件,用于根据默认或用户配置的Json Schema对AI的响应进行结构化,以便后续插件处理。注意目前只支持非流式响应。
iconUrl: https://img.alicdn.com/imgextra/i1/O1CN018iKKih1iVx287RltL_!!6000000004419-2-tps-42-42.png
version: 1.0.0
contact:
name: johnlanni
spec:
phase: UNSPECIFIED_PHASE
priority: 150
configSchema:
openAPIV3Schema:
type: object
example:
serviceName: qwen
serviceDomain: dashscope.aliyuncs.com
apiKey: [Your API Key]
servicePath: /compatible-mode/v1/chat/completions
jsonSchema:
title: ReasoningSchema
type: object
properties:
reasoning_steps:
type: array
items:
type: string
description: The reasoning steps leading to the final conclusion.
answer:
type: string
description: The final answer, taking into account the reasoning steps.
required:
- reasoning_steps
- answer
additionalProperties: false
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-prompt-decorator
title: AI Prompt Decorator
x-title-i18n:
zh-CN: AI 提示词修饰
zh-CN: AI 提示词
description: Add additional prompts before and after the user's input to simplify the interaction between the user and the large language model.
x-description-i18n:
zh-CN: 在用户输入的提示词前后添加额外的修饰,简化用户与大语言模型的交互。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-prompt-template
title: AI Prompt Template
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/ai-proxy/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-proxy
title: AI Proxy
Expand Down
3 changes: 2 additions & 1 deletion backend/sdk/src/main/resources/plugins/ai-quota/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
apiVersion: 1.0.0
info:
type: oss
category: ai
name: ai-quota
title: AI Quota
x-title-i18n:
zh-CN: AI 配额
zh-CN: AI 配额管理
description: Implement quota-based rate limiting according to assigned fixed quotas, while also supporting quota management capabilities, including querying, refreshing, and adjusting quotas.
x-description-i18n:
zh-CN: 根据分配固定的 quota 进行 quota 策略限流,同时支持 quota 管理能力,包括查询 quota、刷新 quota、增减 quota。
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/ai-rag/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-rag
title: AI RAG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-security-guard
title: AI Security Guard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-statistics
title: AI Statistics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-token-ratelimit
title: AI Token Rate Limit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: ai
name: ai-transformer
title: AI Transformer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: auth
name: basic-auth/v1
title: Basic Auth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: security
name: bot-detect/v1
title: Bot Detect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
apiVersion: 1.0.0
info:
type: oss
category: transformation
name: cache-control
title: Cache Control
title: Browser Cache Control
x-title-i18n:
zh-CN: 缓存控制
zh-CN: 浏览器缓存控制
description: Add Expires and Cache-Control headers to the response headers to facilitate browser caching of specific file types, such as jpg, png, and other image files.
x-description-i18n:
zh-CN: 为响应头部添加 Expires 和 Cache-Control 头部,从而方便浏览器对特定后缀的文件进行缓存,例如 jpg、png 等图片文件。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: traffic
name: cluster-key-rate-limit
title: Key Cluster Rate Limit
Expand Down
3 changes: 2 additions & 1 deletion backend/sdk/src/main/resources/plugins/cors/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
apiVersion: 1.0.0
info:
type: oss
category: security
name: cors
title: CORS
x-title-i18n:
zh-CN: CORS
zh-CN: 跨域资源共享
description: Enables CORS (Cross-Origin Resource Sharing) HTTP response headers for the server.
x-description-i18n:
zh-CN: 为服务端启用 CORS(Cross-Origin Resource Sharing,跨域资源共享)的返回 HTTP 响应头。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: transformation
name: custom-response/v1
title: Custom Response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: transformation
name: de-graphql
title: DeGraphQL
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/ext-auth/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: auth
name: ext-auth
title: Ext Auth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: transformation
name: frontend-gray
title: Frontend Gray
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/geo-ip/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: transformation
name: geo-ip
title: Geo IP
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/hmac-auth/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: auth
name: hmac-auth/v1
title: HMAC Auth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: oss
category: traffic
name: ip-restriction
title: IP Restriction
Expand Down
1 change: 1 addition & 0 deletions backend/sdk/src/main/resources/plugins/jwt-auth/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: 1.0.0
info:
type: enterprise
category: auth
name: jwt-auth/v1
title: JWT Auth
Expand Down
Loading

0 comments on commit 685a499

Please sign in to comment.