Spaces:
No application file
No application file
File size: 402 Bytes
b325aad |
1 2 3 4 5 6 7 8 9 10 11 |
from typing import Literal
from src.agenticRAG.models.state import AgentState
def route_query(state: AgentState) -> Literal["rag_path", "web_search", "direct_llm"]:
"""Route to appropriate path based on decision"""
route_map = {
"RAG": "rag_path",
"WEB": "web_search",
"DIRECT": "direct_llm"
}
return route_map.get(state.route_decision, "direct_llm") |