Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

ux: Fine-tune LLM timeout delays

Clémence Lesné6d46126e6adf
diff --git a/README.md b/README.md
index df77171..af1942e 100644
--- a/README.md
+++ b/README.md
@@ -472,8 +472,8 @@ Conversation options are represented as features. They can be configured from Ap
| Name | Description | Type | Default |
|-|-|-|-|
-| `answer_hard_timeout_sec` | The hard timeout for the bot answer in secs. | `int` | 60 |
-| `answer_soft_timeout_sec` | The soft timeout for the bot answer in secs. | `int` | 30 |
+| `answer_hard_timeout_sec` | Time waiting the LLM before aborting the answer with an error message. | `int` | 40 |
+| `answer_soft_timeout_sec` | Time waiting the LLM before sending a waiting message. | `int` | 15 |
| `callback_timeout_hour` | The timeout for a callback in hours. Set 0 to disable. | `int` | 3 |
| `phone_silence_timeout_sec` | Amount of silence in secs to trigger a warning message from the assistant. | `int` | 20 |
| `recognition_retry_max` | TThe maximum number of retries for voice recognition. Minimum of 1. | `int` | 3 |
diff --git a/app/helpers/features.py b/app/helpers/features.py
index 00fbc14..1023701 100644
--- a/app/helpers/features.py
+++ b/app/helpers/features.py
@@ -17,10 +17,10 @@ T = TypeVar("T", bool, int, float, str)
async def answer_hard_timeout_sec() -> int:
"""
- The hard timeout for the bot answer in secs.
+ Time waiting the LLM before aborting the answer with an error message.
"""
return await _default(
- default=60,
+ default=40,
key="answer_hard_timeout_sec",
type_res=int,
)
@@ -28,10 +28,10 @@ async def answer_hard_timeout_sec() -> int:
async def answer_soft_timeout_sec() -> int:
"""
- The soft timeout for the bot answer in secs.
+ Time waiting the LLM before sending a waiting message.
"""
return await _default(
- default=30,
+ default=15,
key="answer_soft_timeout_sec",
type_res=int,
)
diff --git a/cicd/bicep/app.bicep b/cicd/bicep/app.bicep
index e867abc..f4b8d16 100644
--- a/cicd/bicep/app.bicep
+++ b/cicd/bicep/app.bicep
@@ -949,8 +949,8 @@ resource assignmentAppConfigurationDataReader 'Microsoft.Authorization/roleAssig
resource configValues 'Microsoft.AppConfiguration/configurationStores/keyValues@2023-03-01' = [
for item in items({
- answer_hard_timeout_sec: 180
- answer_soft_timeout_sec: 30
+ answer_hard_timeout_sec: 40
+ answer_soft_timeout_sec: 15
callback_timeout_hour: 3
phone_silence_timeout_sec: 20
recognition_retry_max: 2