refactor: 重构 AgentScope ReAct Runner 与事件处理
- 重构 runtime/runner.py 实现 ReAct Agent 核心逻辑 - 更新事件编码器与存储机制 - 优化 prompt 系统与 tool 调用 - 调整 agent service 与 repository 配合
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user