This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
@keyframes bounce { | |
30% { | |
transform: translateY(0%); | |
} | |
40% { | |
transform: translateY(-5%); | |
} | |
50% { | |
transform: translateY(-10%); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Ask: "You made a recent inquiry, can I ask you a few quick follow-up questions?" | |
- if response indicates interest: Proceed to step 2. | |
- if response indicates no interest: Proceed to 'Call Closing'. | |
2. Ask: "You connected with us in regard to an auto accident. Is this something you would still be interested in pursuing?" | |
- If response indicates interest: Proceed to step 3. | |
- If response indicates no interest: Proceed to 'Call Closing'. | |
3. Ask: "What was the approximate date of injury and in what state did it happen?" | |
- Proceed0 to step 4. | |
4. Ask: "On a scale of 1 to 3, would you rate the injury? 1 meaning no one was really injured 2 meaning you were severely injured or 3 meaning it was a catastrophic injury?" | |
- If response indicates injury level above 1: Proceed to step 5. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Role] | |
You’re Susan, an AI assistant for AI Law. Your Primary task is to interact with customer, ask question, and gather information for appointment booking with the customer. | |
[Context] | |
You’re engaged with the customer to book appointment. Stay focused on this context and provide relevant information to the customer. Once connected to a customer, proceed to Conversation Flow section. Focus on the task of booking an appointment. AI assistant will not invent anything that is not drawn directly from the context. AI assistant will not answer questions that are not related to the context. AI assistant will refrain from triggering any tools or functions unless specifically instructed to do so. Do not modify or attempt to correct user input parameters, Pass them directly as given. | |
[Response Handling] | |
When asking any question from the 'Conversation Flow' section, evaluate the customer response to determine if it qualifies as a valid answer or is similar to the expected answer. Use context awareness to assess the r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const string_variable = `【23:00:00†source】 | |
higher highs and higher lows for uptrends, and lower highs and lower | |
lows for downtrends 【4:01†source】 【4:17†source】 .Level Identification: | |
Mark levels on the hourly chart where the price changes trend (e.g., from downtrend to uptrend). | |
Use the open price of the candle that starts the new trend direction as your level 【4:11†source】 .` | |
const parsed_transcription = string_variable.replace(/\【([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?†source\】/g,''); | |
console.log({parsed_transcription}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from dotenv import load_dotenv | |
load_dotenv() | |
from vocode.streaming.telephony.conversation.outbound_call import OutboundCall | |
from vocode.streaming.telephony.config_manager.redis_config_manager import RedisConfigManager | |
from langchain.memory import ConversationBufferMemory | |
from vocode.streaming.models.agent import ChatGPTAgentConfig | |
from vocode.streaming.models.synthesizer import AzureSynthesizerConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
import sys | |
# Third-party imports | |
from fastapi import FastAPI | |
from vocode.streaming.telephony.config_manager.redis_config_manager import ( | |
RedisConfigManager, | |
) | |
from vocode.streaming.telephony.server.base import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"text": "To schedule a new appointment, press 1.", | |
"response": "Please hold while we transfer you to our scheduling department.", | |
"isEndOfInteraction": true | |
}, | |
{ | |
"text": "For prescription refills, press 2.", | |
"response": "Please leave a message with your name, date of birth, and the medication you need refilled. Our pharmacist will process your request within 24 hours.", | |
"isEndOfDecisionTree": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type QuestionOption = "Yes" | "No" | "YES" | "NO"; | |
interface Question { | |
answer: QuestionOption; | |
question: string; | |
options: QuestionOption[]; | |
} | |
interface Quiz { | |
imageURL: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRateLimiter(options = {}) { | |
// TODO: add check here for options coming | |
const rateLimiterFastBruteByIP = new RateLimiterMemory({ ...options, ...RATE_LIMITER_FAST_BRUTE_BY_IP_OPTIONS }); | |
return async function authorizationLimiter(req, res, next) { | |
// INFO: get the clientIP when running behind a proxy | |
const ipAddress = req.headers["x-forwarded-for"] || req.socket.remoteAddress; | |
let retrySeconds = 0; | |
try { | |
const rateLimiterResponse = await rateLimiterFastBruteByIP.get(ipAddress); | |
if (rateLimiterResponse && rateLimiterResponse.consumedPoints > RATE_LIMITER_FAST_BRUTE_BY_IP_OPTIONS.points) { |
NewerOlder