今回の到達点(DeciKG “箱” 完了)
route_executor.pyから DeciKGClient 直呼びを排除(grepで確認済み)/nlq/executeの CYPHER_ONLY でexecution_kind="graph"graph {nodes[], edges[], evidence?, summary?, meta?}を返せる- dummyでも UI を止めない(nodes/edges 最小保証)
- 現状 executor は
meta.executor="decikg_client"(stub 実装経由)で graph を返している
※decikg_execute.pyは repo 的に import 経路がまだ揃ってない(api/app/services/...vsapp/services/...)ので、次フェーズで整理対象
確認コマンド(再掲・保存用)
1) route_executor から DeciKGClient が消えていること
grep -n "DeciKGClient" -n api/app/services/executors/route_executor.py || echo "OK: no DeciKGClient in route_executor.py"
2) /nlq/execute の CYPHER_ONLY(dummyでも graph が返る)
curl -sS -X POST http://localhost:8081/nlq/execute \
-H 'Content-Type: application/json' \
-d '{
"session_id": "smoke-session",
"turn_no": 1,
"route": "CYPHER_ONLY",
"stub_enabled": true,
"trace": true,
"dry_run": true,
"decikg_params": { "kpi": "gross_margin", "scope": "FY2025" }
}' | jq '.meta.executor, .meta.mode, .execution_kind, (.graph.nodes|length), (.graph.edges|length)'
期待値(例)
"decikg_client""dummy""graph"- nodes >= 0
- edges >= 0
3) 返却 payload の最低限チェック(graph が存在すること)
curl -sS -X POST http://localhost:8081/nlq/execute \
-H 'Content-Type: application/json' \
-d '{
"session_id": "smoke-session",
"turn_no": 2,
"route": "CYPHER_ONLY",
"stub_enabled": true,
"trace": true,
"dry_run": true,
"decikg_params": { "kpi": "gross_margin", "scope": "FY2025" }
}' | jq '.execution_kind, .graph.summary, (.graph.nodes|length), (.graph.edges|length)'
次スレでは、nlq_plan が route を決める前提で、/nlq/plan → /nlq/execute → /nlq/analysis(+ dev-portal 呼び)までのE2Eを作っていく感じですね。DeciKGはここまででOK扱いにして進めましょう。
コメントを残す