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

fix: Smoother transitions after using actions

Clémence Lesné5db6a7baffa0
diff --git a/main.py b/main.py
index 38223af..3a18fff 100644
--- a/main.py
+++ b/main.py
@@ -422,9 +422,15 @@ async def intelligence(
text=TTSPrompt.GOODBYE,
)
- # elif chat_res.intent == IndentAction.NEW_CLAIM:
- # elif chat_res.intent == IndentAction.UPDATED_CLAIM:
- # elif chat_res.intent == IndentAction.NEW_REMINDER:
+ elif chat_res.intent in (IndentAction.NEW_CLAIM, IndentAction.UPDATED_CLAIM, IndentAction.NEW_OR_UPDATED_REMINDER):
+ await handle_play(
+ call=call,
+ client=client,
+ store=False,
+ text=chat_res.content,
+ )
+ await intelligence(call, client, target_caller)
+
else:
await handle_recognize(
call=call,