refactor: 重构 AgentScope ReAct Runner 与事件处理

- 重构 runtime/runner.py 实现 ReAct Agent 核心逻辑
- 更新事件编码器与存储机制
- 优化 prompt 系统与 tool 调用
- 调整 agent service 与 repository 配合
This commit is contained in:
qzl
2026-03-16 16:10:39 +08:00
parent ab073c88ed
commit 36b104fa37
22 changed files with 1288 additions and 319 deletions
+4
View File
@@ -128,6 +128,10 @@ async def enqueue_run(
service: Annotated[AgentService, Depends(get_agent_service)],
current_user: Annotated[CurrentUser, Depends(get_current_user)],
) -> TaskAcceptedResponse:
try:
request = parse_run_input(request.model_dump(by_alias=True, exclude_none=True))
except ValueError as exc:
raise HTTPException(status_code=422, detail=str(exc)) from exc
try:
validate_run_request_messages_contract(request)
except ValueError as exc: