* Updated code to dial out to an operator, keep track of operator conversation while escalated and then return to conversation when finished * Removed unnecessary imports * Updated bot runner code, added call routing file and then updated the call transfer and voicemail detection examples * Updated the bot files * Made prompt one level higher in the body and an array * Updated call transfer examples to work correctly * Updated gemini voicemail detection example to work * Added twilio bot support back to the bot_runner * Moved some state management, participant management and other logic to the helper file. * Updated comments * Updated env and requirements file * Ran the examples and made sure code works. Still need to work on the prompts a bit * Fixed format issue * Add support to disable summary in call transfer * Added support for operator transfer mode * Updated readme file * Updated readme based on feedback, and handling of various properties in the json to be more flexible for future examples * Updated number of endpoints * Updated readme to remove fly deployment text and replaced with Pipecat Cloud * Starting to tweak function calls and prompts * Updated examples to more consistently call the functions and say what they need to say * Updated examples * Updated examples * Updated examples to work correctly * Add simple bot versions of dialin and dialout * Refactored the bot runner file to make adding future examples easier * Based on feedback, removed examples for multiple LLMs and also adjusted voicemail detection code to be simpler * Made sure to only capture the users transcription once * Updated readme with latest changes * Forgot to update the order of examples in one place * Fixed formatting issue * Adjusted based on james feedback * Changed default_mode to default_calltransfer_mode
24 lines
813 B
Python
24 lines
813 B
Python
# bot_constants.py
|
|
"""Constants used across the bot runner application."""
|
|
|
|
# Maximum session time
|
|
MAX_SESSION_TIME = 5 * 60 # 5 minutes
|
|
|
|
# Required environment variables
|
|
REQUIRED_ENV_VARS = [
|
|
"OPENAI_API_KEY",
|
|
"GOOGLE_API_KEY",
|
|
"DAILY_API_KEY",
|
|
"CARTESIA_API_KEY",
|
|
"DEEPGRAM_API_KEY",
|
|
]
|
|
|
|
# Default example to use when handling dialin webhooks - determines which bot type to run
|
|
DEFAULT_DIALIN_EXAMPLE = "call_transfer" # Options: call_transfer, simple_dialin
|
|
|
|
# Call transfer configuration constants
|
|
DEFAULT_CALLTRANSFER_MODE = "dialout"
|
|
DEFAULT_SPEAK_SUMMARY = True # Speak a summary of the call to the operator
|
|
DEFAULT_STORE_SUMMARY = False # Store summary of the call (for future implementation)
|
|
DEFAULT_TEST_IN_PREBUILT = False # Test in prebuilt mode (bypasses need to dial in/out)
|