Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Jan 21, 2025
2 parents 12fd8ce + a6a3958 commit 40d003b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 3 additions & 3 deletions app/helpers/call_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ async def _response_callback(_retry: bool = False) -> None:
)
)

# Process the response and wait for latency metrics
await _commit_answer(wait=False)
# Process the response and wait for it to be able to kill the task if needed
await _commit_answer(wait=True)

# First call
if len(call.messages) <= 1:
Expand All @@ -215,7 +215,7 @@ async def _response_callback(_retry: bool = False) -> None:
)
# User is back
else:
# Welcome with the LLM, do not use the end call tool for the first message, LLM hallucinates it and this is extremely frustrating for the user
# Welcome with the LLM, do not use the end call tool for the first message, LLM hallucinates it and this is extremely frustrating for the user, don't wait for the response to start the VAD quickly
await _commit_answer(
tool_blacklist={"end_call"},
wait=False,
Expand Down
8 changes: 4 additions & 4 deletions app/helpers/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@

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,
)


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,
)
Expand Down
3 changes: 1 addition & 2 deletions app/helpers/llm_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ async def new_claim(
content="",
persona=MessagePersonaEnum.HUMAN,
),
# Reinsert the last message, using more will add the user message asking to create the new claim and the assistant can loop on it sometimes
self.call.messages[-1],
# TODO: Should it be a reminder for the last conversation subject? It would allow to keep the context of the conversation. Keeping the last message in the history is felt as weird for users (see: https://github.com/microsoft/call-center-ai/issues/397).
],
)
)
Expand Down
4 changes: 2 additions & 2 deletions cicd/bicep/app.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40d003b

Please sign in to comment.