发布 0.3.0:恢复 Chat 接口并增强云端事件通知
This commit is contained in:
+28
-150
@@ -15,6 +15,34 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/ai/v1/chat/completions": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"AI 网关"
|
||||
],
|
||||
"summary": "OpenAI Chat Completions 兼容端点",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "OpenAI chat/completions 请求体(支持 stream;经 Responses 转换直通)",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OpenAI 兼容响应(流式为 SSE,末尾 data: [DONE])",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ai/v1/embeddings": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -1154,124 +1182,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/log-events/alert-rules": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "告警规则列表",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "创建告警规则",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.alertRuleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/log-events/alert-rules/{ruleId}": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "更新告警规则",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "规则 ID",
|
||||
"name": "ruleId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.alertRuleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "删除告警规则",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "规则 ID",
|
||||
"name": "ruleId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "无内容"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/oci-configs": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -5863,38 +5773,6 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"internal_api.alertRuleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"eventTypes": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"ociConfigId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"resourceMatch": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceIpMode": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceIps": {
|
||||
"type": "string"
|
||||
},
|
||||
"threshold": {
|
||||
"type": "integer"
|
||||
},
|
||||
"windowMinutes": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.attachBootVolumeRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
+28
-150
@@ -8,6 +8,34 @@
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/ai/v1/chat/completions": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"AI 网关"
|
||||
],
|
||||
"summary": "OpenAI Chat Completions 兼容端点",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "OpenAI chat/completions 请求体(支持 stream;经 Responses 转换直通)",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OpenAI 兼容响应(流式为 SSE,末尾 data: [DONE])",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ai/v1/embeddings": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -1147,124 +1175,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/log-events/alert-rules": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "告警规则列表",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "创建告警规则",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.alertRuleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/log-events/alert-rules/{ruleId}": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "更新告警规则",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "规则 ID",
|
||||
"name": "ruleId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.alertRuleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"任务与日志回传"
|
||||
],
|
||||
"summary": "删除告警规则",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "规则 ID",
|
||||
"name": "ruleId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "无内容"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/oci-configs": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -5856,38 +5766,6 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"internal_api.alertRuleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"eventTypes": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"ociConfigId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"resourceMatch": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceIpMode": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceIps": {
|
||||
"type": "string"
|
||||
},
|
||||
"threshold": {
|
||||
"type": "integer"
|
||||
},
|
||||
"windowMinutes": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.attachBootVolumeRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
+18
-93
@@ -1,26 +1,5 @@
|
||||
basePath: /
|
||||
definitions:
|
||||
internal_api.alertRuleRequest:
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
eventTypes:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
ociConfigId:
|
||||
type: integer
|
||||
resourceMatch:
|
||||
type: string
|
||||
sourceIpMode:
|
||||
type: string
|
||||
sourceIps:
|
||||
type: string
|
||||
threshold:
|
||||
type: integer
|
||||
windowMinutes:
|
||||
type: integer
|
||||
type: object
|
||||
internal_api.attachBootVolumeRequest:
|
||||
properties:
|
||||
bootVolumeId:
|
||||
@@ -599,6 +578,24 @@ info:
|
||||
title: OCI Portal API
|
||||
version: 0.0.1
|
||||
paths:
|
||||
/ai/v1/chat/completions:
|
||||
post:
|
||||
parameters:
|
||||
- description: OpenAI chat/completions 请求体(支持 stream;经 Responses 转换直通)
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
"200":
|
||||
description: 'OpenAI 兼容响应(流式为 SSE,末尾 data: [DONE])'
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
summary: OpenAI Chat Completions 兼容端点
|
||||
tags:
|
||||
- AI 网关
|
||||
/ai/v1/embeddings:
|
||||
post:
|
||||
parameters:
|
||||
@@ -1297,78 +1294,6 @@ paths:
|
||||
summary: 回传日志事件列表
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
/api/v1/log-events/alert-rules:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 告警规则列表
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
post:
|
||||
parameters:
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.alertRuleRequest'
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 创建告警规则
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
/api/v1/log-events/alert-rules/{ruleId}:
|
||||
delete:
|
||||
parameters:
|
||||
- description: 规则 ID
|
||||
in: path
|
||||
name: ruleId
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"204":
|
||||
description: 无内容
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 删除告警规则
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
put:
|
||||
parameters:
|
||||
- description: 规则 ID
|
||||
in: path
|
||||
name: ruleId
|
||||
required: true
|
||||
type: integer
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.alertRuleRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 更新告警规则
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
/api/v1/oci-configs:
|
||||
get:
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user