Spaces:
Runtime error
Runtime error
File size: 314 Bytes
06696b5 |
1 2 3 4 5 6 7 8 9 10 11 |
from utils.cache import cache_response
from type.state_schema import RAGState
def save_response(state: RAGState) -> RAGState:
query = state.query
top_k = getattr(state, "top_k", 5)
response = state.final_response
cache_response(query, top_k, response)
return state # λ³κ²½ μμ
|