fix telephony app
This commit is contained in:
parent
12a2f91808
commit
7cdf57c8d8
2 changed files with 9 additions and 12 deletions
|
|
@ -24,7 +24,7 @@ logger.setLevel(logging.DEBUG)
|
|||
|
||||
config_manager = RedisConfigManager()
|
||||
|
||||
BASE_URL = "59b8e140372d.ngrok.app"
|
||||
BASE_URL = "<YOUR BASE URL>"
|
||||
|
||||
telephony_server = TelephonyServer(
|
||||
base_url=BASE_URL,
|
||||
|
|
@ -37,10 +37,6 @@ telephony_server = TelephonyServer(
|
|||
prompt_preamble="Have a pleasant conversation about life",
|
||||
generate_responses=True,
|
||||
),
|
||||
twilio_config=TwilioConfig(
|
||||
account_sid=getenv("TWILIO_ACCOUNT_SID"),
|
||||
auth_token=getenv("TWILIO_AUTH_TOKEN"),
|
||||
),
|
||||
)
|
||||
],
|
||||
logger=logger,
|
||||
|
|
@ -50,18 +46,14 @@ app.include_router(telephony_server.get_router())
|
|||
|
||||
outbound_call = OutboundCall(
|
||||
base_url=BASE_URL,
|
||||
to_phone="+14088926228",
|
||||
from_phone="+14086600744",
|
||||
to_phone="+11234567890",
|
||||
from_phone="+11234567890",
|
||||
config_manager=config_manager,
|
||||
agent_config=ChatGPTAgentConfig(
|
||||
initial_message=BaseMessage(text="What up"),
|
||||
prompt_preamble="Have a pleasant conversation about life",
|
||||
generate_responses=True,
|
||||
),
|
||||
twilio_config=TwilioConfig(
|
||||
account_sid=getenv("TWILIO_ACCOUNT_SID"),
|
||||
auth_token=getenv("TWILIO_AUTH_TOKEN"),
|
||||
),
|
||||
logger=logger,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import logging
|
|||
from typing import Optional
|
||||
from fastapi import APIRouter, Form, Response
|
||||
from pydantic import BaseModel
|
||||
from vocode import getenv
|
||||
from vocode.streaming.agent.base_agent import BaseAgent
|
||||
from vocode.streaming.models.agent import AgentConfig
|
||||
from vocode.streaming.models.synthesizer import (
|
||||
|
|
@ -111,7 +112,11 @@ class TelephonyServer:
|
|||
sampling_rate=DEFAULT_SAMPLING_RATE,
|
||||
audio_encoding=DEFAULT_AUDIO_ENCODING,
|
||||
),
|
||||
twilio_config=twilio_config,
|
||||
twilio_config=twilio_config
|
||||
or TwilioConfig(
|
||||
account_sid=getenv("TWILIO_ACCOUNT_SID"),
|
||||
auth_token=getenv("TWILIO_AUTH_TOKEN"),
|
||||
),
|
||||
twilio_sid=twilio_sid,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue