Upload hue_portal/chatbot/chatbot.py with huggingface_hub
Browse files
hue_portal/chatbot/chatbot.py
CHANGED
|
@@ -136,7 +136,7 @@ class Chatbot(CoreChatbot):
|
|
| 136 |
# tránh trả lại các câu trả lời cũ không có options.
|
| 137 |
cached_response = None
|
| 138 |
if intent != "search_legal":
|
| 139 |
-
|
| 140 |
if cached_response:
|
| 141 |
cached_response["_cache"] = "exact_match"
|
| 142 |
cached_response["_source"] = cached_response.get("_source", "cache")
|
|
|
|
| 136 |
# tránh trả lại các câu trả lời cũ không có options.
|
| 137 |
cached_response = None
|
| 138 |
if intent != "search_legal":
|
| 139 |
+
cached_response = EXACT_MATCH_CACHE.get(query, intent)
|
| 140 |
if cached_response:
|
| 141 |
cached_response["_cache"] = "exact_match"
|
| 142 |
cached_response["_source"] = cached_response.get("_source", "cache")
|