aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.py4
-rw-r--r--outbound_call.py21
2 files changed, 19 insertions, 6 deletions
diff --git a/main.py b/main.py
index 079d569..c49cdd6 100644
--- a/main.py
+++ b/main.py
@@ -53,8 +53,8 @@ telephony_server = TelephonyServer(
TwilioInboundCallConfig(
url="/inbound_call",
agent_config=ChatGPTAgentConfig(
- initial_message=BaseMessage(text="What up"),
- prompt_preamble="Have a pleasant conversation about life",
+ initial_message=BaseMessage(text="What up."),
+ prompt_preamble="Act as a customer talking to 'Cosmos', a pizza establisment ordering a large pepperoni pizza for pickup. If asked for a name, your name is 'Hunter McRobie', and your credit card number is 4743 2401 5792 0539 CVV: 123 and expiratoin is 10/25. If asked for numbers, say them one by one",#"Have a polite conversation about life while talking like a pirate.",
generate_responses=True,
),
twilio_config=TwilioConfig(
diff --git a/outbound_call.py b/outbound_call.py
index 745a39d..8bd4b5c 100644
--- a/outbound_call.py
+++ b/outbound_call.py
@@ -1,8 +1,13 @@
import os
from dotenv import load_dotenv
-load_dotenv()
+import logging
+logging.basicConfig(level=logging.DEBUG)
+load_dotenv()
+from vocode.streaming.models.agent import ChatGPTAgentConfig
+from vocode.streaming.models.message import BaseMessage
+from vocode.streaming.models.synthesizer import ElevenLabsSynthesizerConfig
from vocode.streaming.telephony.conversation.outbound_call import OutboundCall
from vocode.streaming.telephony.config_manager.redis_config_manager import (
RedisConfigManager,
@@ -18,10 +23,18 @@ async def main():
outbound_call = OutboundCall(
base_url=BASE_URL,
- to_phone="+15555555555",
- from_phone="+15555555555",
+ to_phone="+17208828227",
+ from_phone="+18445610144",
config_manager=config_manager,
- agent_config=SpellerAgentConfig(generate_responses=False),
+ agent_config=ChatGPTAgentConfig(
+ initial_message=BaseMessage(text="What up"),
+ prompt_preamble="Have a polite conversation about life while talking like a pirate.",
+ generate_responses=True,
+ ),
+ synthesizer_config=ElevenLabsSynthesizerConfig.from_telephone_output_device(
+ api_key=os.getenv("ELEVENLABS_API_KEY"),
+ voice_id=os.getenv("YOUR VOICE ID")
+ )
)
input("Press enter to start call...")