18 lines
611 B
Plaintext
18 lines
611 B
Plaintext
# 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)
|