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: Static prompts are originating from assistant not user

Clémence Lesnée5fbab02d35f
diff --git a/main.py b/main.py
index b4865a4..68378e4 100644
--- a/main.py
+++ b/main.py
@@ -441,7 +441,7 @@ async def handle_play(
See: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts
"""
- call.messages.append(CallMessageModel(content=text, persona=CallPersona.HUMAN))
+ call.messages.append(CallMessageModel(content=text, persona=CallPersona.ASSISTANT))
try:
client.play_media_to_all(
play_source=audio_from_text(text), operation_context=context