smarter: factual-model routing (beh-10), fetch_url main-content extraction + 8k cap (url-08), get_weather via met.no (spec-016)

This commit is contained in:
Oleksandr Kozachuk
2026-07-17 19:15:18 +02:00
parent f8b9bc75ee
commit e0b97363c9
11 changed files with 404 additions and 6 deletions
+4
View File
@@ -105,6 +105,7 @@ class AIMessage(AIMessageBase):
self.channel = channel
self.direct = direct
self.historise_question = historise_question
self.factual = False # classifier verdict; may route to factual-model (BEH-10)
self.vars = ["user", "message", "channel", "direct", "historise_question"]
@@ -340,6 +341,9 @@ class AIResponder(AIResponderBase):
# Get the history limit from the configuration
limit = self.config["history-limit"]
# Factual verdict routes this call to factual-model if configured (BEH-10)
self._factual = bool(getattr(message, "factual", False))
# Check if a short path applies, return an empty AIResponse if it does
if self.short_path(message, limit):
await self._persist_history()