main: 增强 Agent Run 调度可靠性与幂等性
- 默认切换 AgentProvider 为 HttpAgentProvider,增强网络请求的容错和重试机制 - 优化 Run 逻辑,支持多场景去重与并发保护 - 添加 Redis 发布失败的日志记录以提升问题排查效率 - 扩展 OpenAPI 规范,新增 Error 和 Run 状态相关模型 - 增强测试覆盖,验证调度策略和重复请求的幂等性 - 增加数据库索引以优化查询性能 - 更新所有相关文档和配置文件
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: ChatSession & Message API
|
||||
version: 1.1.0
|
||||
version: 1.1.1
|
||||
description: |
|
||||
ChatSession & Message API(含 Archive/GetMessage/SSE 与 Run 调度)。自然语言:中文。
|
||||
servers:
|
||||
@@ -15,6 +15,13 @@ tags:
|
||||
- name: Run
|
||||
description: Agent Run 调度
|
||||
paths:
|
||||
/test:
|
||||
summary: 测试接口
|
||||
get:
|
||||
tags: [Test]
|
||||
responses:
|
||||
"200":
|
||||
description: 成功
|
||||
/sessions:
|
||||
post:
|
||||
tags: [ChatSession]
|
||||
@@ -422,8 +429,13 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
payload:
|
||||
type: object
|
||||
nullable: true
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/RunStatusPayload'
|
||||
- $ref: '#/components/schemas/AgentMessagePayload'
|
||||
- $ref: '#/components/schemas/RunCancelPayload'
|
||||
- $ref: '#/components/schemas/RunErrorPayload'
|
||||
- type: object
|
||||
reply_to:
|
||||
type: string
|
||||
format: uuid
|
||||
@@ -470,6 +482,59 @@ components:
|
||||
message:
|
||||
type: string
|
||||
example: Session is closed
|
||||
RunStatusPayload:
|
||||
type: object
|
||||
properties:
|
||||
run_id:
|
||||
type: string
|
||||
format: uuid
|
||||
status:
|
||||
type: string
|
||||
enum: [RUNNING, DONE, FAILED, CANCELED]
|
||||
trigger_message_id:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
error:
|
||||
type: string
|
||||
nullable: true
|
||||
AgentMessagePayload:
|
||||
type: object
|
||||
properties:
|
||||
run_id:
|
||||
type: string
|
||||
format: uuid
|
||||
provider:
|
||||
type: string
|
||||
RunCancelPayload:
|
||||
type: object
|
||||
properties:
|
||||
run_id:
|
||||
type: string
|
||||
format: uuid
|
||||
RunErrorPayload:
|
||||
type: object
|
||||
properties:
|
||||
run_id:
|
||||
type: string
|
||||
format: uuid
|
||||
message:
|
||||
type: string
|
||||
retryable:
|
||||
type: boolean
|
||||
nullable: true
|
||||
http_status:
|
||||
type: integer
|
||||
nullable: true
|
||||
provider:
|
||||
type: string
|
||||
nullable: true
|
||||
latency_ms:
|
||||
type: integer
|
||||
nullable: true
|
||||
raw_message:
|
||||
type: string
|
||||
nullable: true
|
||||
PaginationLinks:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user