feat: direct diagnose endpoint for 人事 project
This commit is contained in:
parent
5cadd4ed70
commit
f55317fbe8
17
wwwroot/api/test_diagnose.dspy
Normal file
17
wwwroot/api/test_diagnose.dspy
Normal file
@ -0,0 +1,17 @@
|
||||
# test_diagnose.dspy - 直接诊断人事项目
|
||||
|
||||
from pipeline_service.agent_loop_v2 import AgentExecutor
|
||||
from pipeline_core.agent_config import SDLC_DEFAULT_CONFIG
|
||||
|
||||
uid = 'user-01'
|
||||
pid = 'T_2hWHTqqwgf8igNMHLQk' # 人事项目
|
||||
|
||||
executor = AgentExecutor(config=SDLC_DEFAULT_CONFIG, project_id=pid, user_id=uid)
|
||||
|
||||
# 手动调用 diagnose 和 list_tasks
|
||||
async with DBPools().sqlorContext('pipeline') as sor:
|
||||
diag = await executor._t_diagnose_project(sor, {}, pid)
|
||||
tasks = await executor._t_list_tasks(sor, {}, pid)
|
||||
|
||||
result = {"diagnose": diag, "tasks": tasks}
|
||||
return json.dumps(result, ensure_ascii=False)
|
||||
Loading…
x
Reference in New Issue
Block a user