Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
feat: Give the call center number to the LLM
Clémence Lesné2cb91894121a
diff --git a/main.py b/main.pyindex 09d0f03..e54fdf5 100644--- a/main.py+++ b/main.py@@ -84,8 +84,8 @@ assert EVENTS_DOMAIN, "EVENTS_DOMAIN environment variable is not set"CALL_EVENT_URL = f"{EVENTS_DOMAIN}/call/event"CALL_INBOUND_URL = f"{EVENTS_DOMAIN}/call/inbound"-DEFAULT_SYSTEM_PROMPT = """- Assistant called {bot_name} and is in a call center for the insurance company {bot_company} as an expert with 20 years of experience. Today is {date}. Customer is calling from {phone_number}.+DEFAULT_SYSTEM_PROMPT = f"""+ Assistant called {CONFIG.workflow.bot_name} and is in a call center for the insurance company {CONFIG.workflow.bot_company} as an expert with 20 years of experience. Today is {{date}}. Customer is calling from {{phone_number}}. Call center number is {CONFIG.communication_service.phone_number}."""CHAT_SYSTEM_PROMPT = f"""Assistant will help the customer with their insurance claim.@@ -490,8 +490,6 @@ async def gpt_completion(system: str, call: CallModel) -> str:messages = [{"content": DEFAULT_SYSTEM_PROMPT.format(- bot_company=CONFIG.workflow.bot_company,- bot_name=CONFIG.workflow.bot_name,date=datetime.now().strftime("%A %d %B %Y %H:%M:%S"),phone_number=call.phone_number,),@@ -531,8 +529,6 @@ async def gpt_chat(call: CallModel) -> ActionModel:messages = [{"content": DEFAULT_SYSTEM_PROMPT.format(- bot_company=CONFIG.workflow.bot_company,- bot_name=CONFIG.workflow.bot_name,date=datetime.now().strftime("%A %d %B %Y %H:%M:%S"),phone_number=call.phone_number,),