Files
agent/app/modules/rag/intent_router_v2/graph_id_resolver.py
T

14 lines
344 B
Python

from __future__ import annotations
class GraphIdResolver:
_GRAPH_MAP = {
"CODE_QA": "CodeQAGraph",
"DOCS_QA": "DocsQAGraph",
"GENERATE_DOCS_FROM_CODE": "GenerateDocsFromCodeGraph",
"PROJECT_MISC": "ProjectMiscGraph",
}
def resolve(self, intent: str) -> str:
return self._GRAPH_MAP[intent]