Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
fix: Send conversations in a proper JSON to the LLM
Clémence Lesnébce035074742
diff --git a/main.py b/main.pyindex 01e90f6..13951d1 100644--- a/main.py+++ b/main.py@@ -8,6 +8,7 @@ from azure.communication.callautomation import (TextSource,)from azure.communication.sms import SmsClient+from pydantic.json import pydantic_encoderfrom azure.core.credentials import AzureKeyCredentialfrom azure.core.exceptions import ResourceNotFoundErrorfrom azure.core.messaging import CloudEvent@@ -444,7 +445,7 @@ async def gpt_completion(system: LLMPrompt, call: CallModel) -> str:},{"content": system.format(- conversation=str(call.messages),+ conversation=json.dumps(call.messages, default=pydantic_encoder),claim=call.claim.model_dump_json(),),"role": "system",