Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
quality: Refacto var naming
Clémence Lesnée83985a5f159
diff --git a/models/call.py b/models/call.pyindex b14524b..7819912 100644--- a/models/call.py+++ b/models/call.py@@ -99,7 +99,7 @@ class CallStateModel(CallGetModel):with TRACER.start_as_current_span("trainings"):search = CONFIG.ai_search.instance()- trainings_tasks = await asyncio.gather(+ tasks = await asyncio.gather(*[search.training_asearch_all(text=message.content, lang=self.lang.short_code@@ -108,10 +108,6 @@ class CallStateModel(CallGetModel):],) # Get trainings from last messagestrainings = sorted(- set(- training- for trainings in trainings_tasks- for training in trainings or []- )+ set(training for trainings in tasks for training in trainings or [])) # Flatten, remove duplicates, and sort by scorereturn trainings