| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| object | AI API 相关配置。 | ||
| environmentId | string | 环境 ID。 | env-xxx |
| backendScene | string | 发布场景。 | SingleService |
| autoDeploy | boolean | 是否自动部署。 | true |
| gatewayId | string | 网关实例 ID。 | gw-xx |
| routeBackend | Backend | 后端服务信息。 | |
| gatewayInfo | GatewayInfo | 网关信息。 | |
| mock | HttpApiMockContract | Mock 配置。 | |
| gatewayType | string | 网关类型 | API |
| customDomainIds | array | 用户自定义域名 ID 列表。 | |
| string | 域名 ID。 | d-xxx | |
| serviceConfigs | array<object> | 服务配置列表。 | |
| object | 已有服务配置。 | ||
| serviceId | string | 服务 ID。 | svc-xxx |
| weight | long | 服务权重。 | 100 |
| modelNamePattern | string | 模型名称匹配规则 | qwen-* |
| modelName | string | 模型名称 | qwen-max |
| intentCode | string | 意图编码 | INQUIRY |
| match | HttpApiBackendMatchConditions | 匹配条件。 | |
| policyConfigs | array<object> | 策略配置列表。 | |
| object | 策略配置列表。 | ||
| type | string | 策略类型。 | AiFallback |
| enable | boolean | 是否启用。 | true |
| aiFallbackConfig | object | AiFallback 策略配置 | |
| serviceConfigs | array<object> | 服务配置列表 | |
| object | 服务配置列表。 | ||
| serviceId | string | 服务 id | svc-****** |
| targetModelName | string | 目标模型名称 | gpt-4/llama3-70b |
| aiSecurityGuardConfig | object | 循环规则。 | |
| serviceAddress | string | 服务地址,用于指定后端服务的网络位置 | https://api.example.com/v1 |
| checkRequest | boolean | 是否启用请求校验 | true |
| checkResponse | boolean | 是否启用响应校验 | true |
| checkRequestImage | boolean | 是否启用请求中的图像内容校验 | true |
| checkResponseImage | boolean | 是否启用响应中的图像内容校验 | true |
| requestCheckService | string | 用于请求校验的外部服务地址或配置 | https://checker.example.com/validate-request |
| responseCheckService | string | 用于响应校验的外部服务地址或配置 | https://checker.example.com/validate-response |
| requestImageCheckService | string | 用于请求中图像内容校验的外部服务地址或配置 | https://image-checker.example.com/scan |
| responseImageCheckService | string | 用于响应中图像内容校验的外部服务地址或配置 | https://image-checker.example.com/scan-response |
| riskAlertLevel | string | 风险告警级别,用于标识内容或行为的风险等级 | low/medium/high |
| riskConfig | array<object> | 循环规则。 | |
| object | 循环规则。 | ||
| type | string | 策略类型。 | K8S |
| level | string | 冲突等级,类型 string。取值:
| Critical |
| consumerRules | object | 循环规则。 | |
| pattern | string | 当 type=relativeMonthly 时,用于指定每月第几周:
| first |
| matchType | string | 查询匹配类型
| term |
| bufferLimit | integer | 缓冲区大小上限(字节) | 50 |
| consumerRequestCheckService | array<object> | 消费者请求校验服务 | |
| object | |||
| name | string | 名称 | API |
| requestCheckService | string | 请求校验服务 | https://checker.example.com/validate |
| requestImageCheckService | string | 请求图像校验服务 | https://image-check.example.com/scan |
| matchType | string | 匹配类型 | exact/prefix |
| modalityType | string | 模态类型 | text/image |
| consumerResponseCheckService | array<object> | 消费者响应校验服务 | |
| object | |||
| name | string | 名称 | AI_API |
| responseCheckService | string | 响应校验服务 | https://checker.example.com/validate-response |
| responseImageCheckService | string | 响应图像校验服务 | https://image-check.example.com/scan-response |
| matchType | string | 查询匹配类型
| term |
| modalityType | string | 模态类型 | text/image |
| consumerRiskLevel | array<object> | 消费者风险等级 | |
| object | |||
| name | string | 参数名称 | APIG-UI |
| matchType | string | 查询匹配类型
| term |
| type | string | 后端服务场景:
| K8S |
| level | string | 冲突等级,类型 string。取值:
| Critical |
| aiTokenRateLimitConfig | object | AI 令牌速率限制配置 | |
| rules | array<object> | 校验或处理规则列表 | |
| object | 校验或处理规则列表 | ||
| limitType | string | 限流类型 | request/token |
| matchKey | string | 匹配键 | user_id/api_path |
| matchType | string | 查询匹配类型
| term |
| matchValue | string | 匹配值 | user123 |
| limitMode | string | 限流模式 | local |
| limitValue | integer | 限流值 | 100 |
| globalRules | array<object> | 全局规则 | |
| object | 全局规则 | ||
| limitType | string | 限流类型 | request |
| matchKey | string | 匹配键 | user_id |
| matchType | string | 查询匹配类型
| term |
| matchValue | string | 匹配值 | user123 |
| limitMode | string | 限流模式 | local |
| limitValue | integer | 限流值 | 100 |
| enableGlobalRules | boolean | 是否启用全局规则 | true |
| customDomainInfos | array<object> | 用户自定义域名内容列表。 | |
| object | 用户自定义域名内容列表。 | ||
| domainId | string | 域名 ID。 | d-cshee6dlhtgk****** |
| name | string | 域名名称。 | hello-server.com |
| protocol | string | 协议。 | HTTP |
| subDomains | array<object> | 二级域名内容列表。 | |
| object | 网络类型。 | ||
| domainId | string | 域名 ID。 | d-csmn42um****** |
| name | string | 域名名称。 | test |
| protocol | string | 协议。 | HTTP |
| networkType | string | 网络类型。 | Intranet |
该文章对您有帮助吗?