fix(archivar): correct Coroutine-Bug root cause — _llm_raw_sync→async _llm_raw, direct await

OllamaLLMClient.generate() is async def — run_in_executor cannot
correctly execute async functions. The coroutine was never awaited.

Also fix Move-Request parser: native button '1️⃣ Rüber' was not
matched against '1️⃣' — fell through to 'stay' instead of 'move'.

- classifier.py: _llm_raw_sync → async _llm_raw, await generate()
- router.py: remove run_in_executor, direct await _llm_raw()
- adapter.py: normalize MOVE_REQ choice (extract leading digit/emoji)
This commit is contained in:
Bernd (Hermes)
2026-06-17 22:01:45 +02:00
parent 27b117e151
commit 3fe2dd832e
3 changed files with 10 additions and 6 deletions
+5
View File
@@ -743,6 +743,11 @@ class RocketChatAdapter(BasePlatformAdapter):
if choice.startswith("MOVE_REQ:") and "::" in choice:
_, choice = choice.split("::", 1)
choice = choice.strip()
# Normalisiere: "1️⃣ Rüber" → "1️⃣", "2 Hier" → "2"
if choice and choice[0] in "123":
choice = choice[0]
elif choice and choice[:2] in ("1️⃣", "2️⃣", "3️⃣"):
choice = choice[:2]
# Altes Format: "1"/"2"/"3" = numerische Antwort
# Neues Format: "1️⃣", "2️⃣", "3️⃣" = Emoji-Nummern
elif choice in ("1", "2", "3") or choice in ("1️⃣", "2️⃣", "3️⃣"):