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:
@@ -598,10 +598,7 @@ class BidirectionalRouter:
|
||||
# Try LLM — expects room ID directly
|
||||
# Semaphore schützt vor parallelen Ollama-Aufrufen (qwen2.5:7b = single-request)
|
||||
async with self._llm_semaphore:
|
||||
loop = asyncio.get_running_loop()
|
||||
llm_result = await loop.run_in_executor(
|
||||
None, self._classifier._llm_raw_sync, prompt
|
||||
)
|
||||
llm_result = await self._classifier._llm_raw(prompt)
|
||||
if llm_result is None:
|
||||
return None, True # LLM-Aufruf fehlgeschlagen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user