Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
quality: Use diminutives for mins and secs in comments
Clémence Lesné93bcc61406cc
diff --git a/helpers/call_llm.py b/helpers/call_llm.pyindex 2afdeef..41fd5a0 100644--- a/helpers/call_llm.py+++ b/helpers/call_llm.py@@ -119,7 +119,7 @@ async def load_llm_chat("""Handle the intelligence of the call, including: LLM chat, TTS, and media play.- Play the loading sound while waiting for the intelligence to be processed. If the intelligence is not processed after few seconds, play the timeout sound. If the intelligence is not processed after more seconds, stop the intelligence processing and play the error sound.+ Play the loading sound while waiting for the intelligence to be processed. If the intelligence is not processed after few secs, play the timeout sound. If the intelligence is not processed after more secs, stop the intelligence processing and play the error sound.Returns the updated call model."""@@ -167,7 +167,7 @@ async def load_llm_chat(def _loading_task() -> asyncio.Task:return asyncio.create_task(asyncio.sleep(loading_timer))- loading_timer = 5 # Play loading sound every 5 seconds+ loading_timer = 5 # Play loading sound every 5 secsloading_task = _loading_task()# Timeoutsdiff --git a/helpers/config_models/conversation.py b/helpers/config_models/conversation.pyindex 573b321..ccd80f7 100644--- a/helpers/config_models/conversation.py+++ b/helpers/config_models/conversation.py@@ -159,11 +159,11 @@ class WorkflowInitiateModel(BaseModel):class ConversationModel(BaseModel):initiate: WorkflowInitiateModelanswer_hard_timeout_sec: int = Field(- default=180, # 3 minutes+ default=180, # 3 minsserialization_alias="intelligence_hard_timeout_sec", # Compatibility with v7)answer_soft_timeout_sec: int = Field(- default=30, # 30 seconds+ default=30, # 30 secsserialization_alias="intelligence_soft_timeout_sec", # Compatibility with v7)callback_timeout_hour: int = Field(diff --git a/helpers/config_models/prompts.py b/helpers/config_models/prompts.pyindex cef78cd..aac0958 100644--- a/helpers/config_models/prompts.py+++ b/helpers/config_models/prompts.py@@ -353,7 +353,7 @@ class LlmModel(BaseModel):bot_phone_number=CONFIG.communication_services.phone_number,date=datetime.now(call.tz()).strftime("%Y-%m-%d %H:%M (%Z)"- ), # Don't include seconds to enhance cache during unit tests. Example: "2024-02-01 18:58".+ ), # Don't include secs to enhance cache during unit tests. Example: "2024-02-01 18:58".phone_number=call.initiate.phone_number,))diff --git a/persistence/cosmos_db.py b/persistence/cosmos_db.pyindex b58e034..47b8185 100644--- a/persistence/cosmos_db.py+++ b/persistence/cosmos_db.py@@ -271,7 +271,7 @@ class CosmosDbStore(IStore):# Usageconsistency_level=ConsistencyLevel.Eventual,# Reliability- connection_timeout=10, # 10 seconds+ connection_timeout=10, # 10 secsretry_backoff_factor=0.8,retry_backoff_max=8,retry_total=3,