Documentation
¶
Index ¶
- Constants
- func ValidateDtmfNumDigits(numDigits int) error
- type CardCaptureDeclinedError
- type CardCollectionRestartError
- type FactoryInfo
- type GetAddressOptions
- type GetAddressResult
- type GetAddressTask
- type GetCardNumberResult
- type GetCardNumberTask
- type GetCreditCardResult
- type GetCreditCardTask
- type GetDOBOptions
- type GetDOBResult
- type GetDOBTask
- type GetDtmfOptions
- type GetDtmfResult
- type GetDtmfTask
- type GetEmailOptions
- type GetEmailResult
- type GetEmailTask
- type GetExpirationDateResult
- type GetExpirationDateTask
- type GetNameOptions
- type GetNameResult
- type GetNameTask
- type GetPhoneNumberOptions
- type GetPhoneNumberResult
- type GetPhoneNumberTask
- type GetSecurityCodeResult
- type GetSecurityCodeTask
- type OutOfScopeError
- type TaskGroup
- type TaskGroupResult
- type WarmTransferOptions
- type WarmTransferResult
- type WarmTransferTask
Constants ¶
View Source
const AddressInstructions = addressInstructionsBeforeConfirmation + addressConfirmationInstruction + "\n" + addressInstructionsAfterConfirmation
View Source
const CardNumberInstructions = `` /* 692-byte string literal not displayed */
View Source
const CreditCardInstructions = `` /* 186-byte string literal not displayed */
View Source
const EmailInstructions = emailInstructionsBeforeConfirmation + emailConfirmationInstruction + "\n" + emailInstructionsAfterConfirmation
View Source
const ExpirationDateInstructions = `` /* 735-byte string literal not displayed */
View Source
const PhoneNumberInstructions = "You are only a single step in a broader system, responsible solely for capturing a phone number.\n" +
"Handle input as noisy voice transcription. Expect that users will say phone numbers aloud in grouped digits or with an optional leading plus.\n" +
"Normalize common spoken patterns silently: convert spoken digits to numeric form, remove filler words, strip dashes, spaces, parentheses, and dots, and recognize plus at the start as the international prefix.\n" +
"Call `update_phone_number` at the first opportunity whenever you form a new hypothesis about the phone number. (before asking any questions or providing any answers.)\n" +
"Don't invent phone numbers, stick strictly to what the user said.\n" +
phoneNumberConfirmationInstruction + "\n" +
"If the number is unclear or invalid, or it takes too much back-and-forth, prompt for it in parts: first the area code, then the remaining digits.\n" +
"Never repeat the phone number back to the user as a single block of digits. Read it back in groups.\n" +
"Ignore unrelated input and avoid going off-topic. Do not generate markdown, greetings, or unnecessary commentary.\n" +
"Avoid verbosity by not sharing example phone numbers or formats unless prompted to do so. Do not deviate from the goal of collecting the user's phone number.\n" +
"Always explicitly invoke a tool when applicable. Do not simulate tool usage, no real action is taken unless the tool is explicitly called."
View Source
const SecurityCodeInstructions = `` /* 710-byte string literal not displayed */
View Source
const WarmTransferBaseInstructions = warmTransferPersona + `
# Context
In the conversation, user refers to the human agent, caller refers to the person who's transcript is included.
Remember, you are not speaking to the caller right now, you are speaking to the human agent.
Once the human agent has confirmed, you should call the tool connect_to_caller to connect them to the caller.
Start by giving them a summary of the conversation so far, and answer any questions they might have.
## Conversation history with caller
%s
## End of conversation history with caller
You are talking to the human agent now,
give a brief introduction of the conversation so far, and ask if they want to connect to the caller.`
Variables ¶
This section is empty.
Functions ¶
func ValidateDtmfNumDigits ¶ added in v0.0.15
Types ¶
type CardCaptureDeclinedError ¶ added in v0.0.15
type CardCaptureDeclinedError struct {
Reason string
}
func (*CardCaptureDeclinedError) Error ¶ added in v0.0.15
func (e *CardCaptureDeclinedError) Error() string
type CardCollectionRestartError ¶ added in v0.0.15
type CardCollectionRestartError struct {
Reason string
}
func (*CardCollectionRestartError) Error ¶ added in v0.0.15
func (e *CardCollectionRestartError) Error() string
type FactoryInfo ¶
type FactoryInfo struct {
ID string
Description string
TaskFactory func() agent.AgentInterface
}
type GetAddressOptions ¶ added in v0.0.15
type GetAddressOptions struct {
RequireConfirmation bool
RequireConfirmationSet bool
Instructions *beta.InstructionParts
}
type GetAddressResult ¶
type GetAddressResult struct {
Address string
}
type GetAddressTask ¶
type GetAddressTask struct {
agent.AgentTask[*GetAddressResult]
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetAddressTask ¶
func NewGetAddressTask(opts GetAddressOptions) *GetAddressTask
func (*GetAddressTask) OnEnter ¶
func (t *GetAddressTask) OnEnter()
type GetCardNumberResult ¶ added in v0.0.15
type GetCardNumberTask ¶ added in v0.0.15
type GetCardNumberTask struct {
agent.AgentTask[*GetCardNumberResult]
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetCardNumberTask ¶ added in v0.0.15
func NewGetCardNumberTask(requireConfirmation ...bool) *GetCardNumberTask
func (*GetCardNumberTask) OnEnter ¶ added in v0.0.15
func (t *GetCardNumberTask) OnEnter()
type GetCreditCardResult ¶ added in v0.0.15
type GetCreditCardTask ¶ added in v0.0.15
type GetCreditCardTask struct {
agent.AgentTask[*GetCreditCardResult]
RequireConfirmation bool
}
func NewGetCreditCardTask ¶ added in v0.0.15
func NewGetCreditCardTask(requireConfirmation ...bool) *GetCreditCardTask
func (*GetCreditCardTask) OnEnter ¶ added in v0.0.15
func (t *GetCreditCardTask) OnEnter()
type GetDOBOptions ¶ added in v0.0.15
type GetDOBResult ¶ added in v0.0.15
type GetDOBTask ¶ added in v0.0.15
type GetDOBTask struct {
agent.AgentTask[*GetDOBResult]
ExtraInstructions string
IncludeTime bool
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetDOBTask ¶ added in v0.0.15
func NewGetDOBTask(opts GetDOBOptions) *GetDOBTask
func (*GetDOBTask) OnEnter ¶ added in v0.0.15
func (t *GetDOBTask) OnEnter()
type GetDtmfOptions ¶ added in v0.0.15
type GetDtmfResult ¶
type GetDtmfResult struct {
UserInput string
}
type GetDtmfTask ¶
type GetDtmfTask struct {
agent.AgentTask[*GetDtmfResult]
NumDigits int
AskForConfirmation bool
DtmfInputTimeout time.Duration
DtmfStopEvent beta.DtmfEvent
// contains filtered or unexported fields
}
func NewGetDtmfTask ¶
func NewGetDtmfTask(numDigits int, askConfirmation bool) (*GetDtmfTask, error)
func NewGetDtmfTaskWithOptions ¶ added in v0.0.15
func NewGetDtmfTaskWithOptions(opts GetDtmfOptions) (*GetDtmfTask, error)
func (*GetDtmfTask) OnEnter ¶
func (t *GetDtmfTask) OnEnter()
func (*GetDtmfTask) OnExit ¶
func (t *GetDtmfTask) OnExit()
type GetEmailOptions ¶ added in v0.0.15
type GetEmailOptions struct {
RequireConfirmation bool
RequireConfirmationSet bool
Instructions *beta.InstructionParts
}
type GetEmailResult ¶
type GetEmailResult struct {
Email string
}
type GetEmailTask ¶
type GetEmailTask struct {
agent.AgentTask[*GetEmailResult]
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetEmailTask ¶
func NewGetEmailTask(opts GetEmailOptions) *GetEmailTask
func (*GetEmailTask) OnEnter ¶
func (t *GetEmailTask) OnEnter()
type GetExpirationDateResult ¶ added in v0.0.15
type GetExpirationDateResult struct {
Date string
}
type GetExpirationDateTask ¶ added in v0.0.15
type GetExpirationDateTask struct {
agent.AgentTask[*GetExpirationDateResult]
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetExpirationDateTask ¶ added in v0.0.15
func NewGetExpirationDateTask(requireConfirmation ...bool) *GetExpirationDateTask
func (*GetExpirationDateTask) OnEnter ¶ added in v0.0.15
func (t *GetExpirationDateTask) OnEnter()
type GetNameOptions ¶ added in v0.0.15
type GetNameResult ¶ added in v0.0.15
type GetNameTask ¶ added in v0.0.15
type GetNameTask struct {
agent.AgentTask[*GetNameResult]
RequireConfirmation bool
CollectFirstName bool
CollectMiddleName bool
CollectLastName bool
VerifySpelling bool
// contains filtered or unexported fields
}
func NewGetNameTask ¶ added in v0.0.15
func NewGetNameTask(opts GetNameOptions) *GetNameTask
func (*GetNameTask) OnEnter ¶ added in v0.0.15
func (t *GetNameTask) OnEnter()
type GetPhoneNumberOptions ¶ added in v0.0.15
type GetPhoneNumberResult ¶ added in v0.0.15
type GetPhoneNumberResult struct {
PhoneNumber string
}
type GetPhoneNumberTask ¶ added in v0.0.15
type GetPhoneNumberTask struct {
agent.AgentTask[*GetPhoneNumberResult]
ExtraInstructions string
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetPhoneNumberTask ¶ added in v0.0.15
func NewGetPhoneNumberTask(opts GetPhoneNumberOptions) *GetPhoneNumberTask
func (*GetPhoneNumberTask) OnEnter ¶ added in v0.0.15
func (t *GetPhoneNumberTask) OnEnter()
type GetSecurityCodeResult ¶ added in v0.0.15
type GetSecurityCodeResult struct {
SecurityCode string
}
type GetSecurityCodeTask ¶ added in v0.0.15
type GetSecurityCodeTask struct {
agent.AgentTask[*GetSecurityCodeResult]
RequireConfirmation bool
// contains filtered or unexported fields
}
func NewGetSecurityCodeTask ¶ added in v0.0.15
func NewGetSecurityCodeTask(requireConfirmation ...bool) *GetSecurityCodeTask
func (*GetSecurityCodeTask) OnEnter ¶ added in v0.0.15
func (t *GetSecurityCodeTask) OnEnter()
type OutOfScopeError ¶
type OutOfScopeError struct {
TargetTaskIDs []string
}
func (*OutOfScopeError) Error ¶
func (e *OutOfScopeError) Error() string
type TaskGroup ¶
type TaskGroup struct {
agent.AgentTask[*TaskGroupResult]
SummarizeChatCtx bool
ReturnExceptions bool
VisitedTasks map[string]struct{}
RegisteredTasks []FactoryInfo
OnTaskCompleted func(taskID string, result any) error
// contains filtered or unexported fields
}
func NewTaskGroup ¶
type TaskGroupResult ¶
type WarmTransferOptions ¶ added in v0.0.15
type WarmTransferOptions struct {
TargetPhone string
TrunkID string
SipConnection *livekit.SIPOutboundConfig
SipNumber string
HoldAudio interface{}
DisableHoldAudio bool
ChatContext *llm.ChatContext
ExtraInstructions string
Instructions *beta.InstructionParts
}
type WarmTransferResult ¶
type WarmTransferResult struct {
HumanAgentIdentity string
}
type WarmTransferTask ¶
type WarmTransferTask struct {
agent.AgentTask[*WarmTransferResult]
TargetPhoneNumber string
SipTrunkID string
SipConnection *livekit.SIPOutboundConfig
SipNumber string
SipHeaders map[string]string
Dtmf string
RingingTimeout time.Duration
HoldAudio interface{}
// contains filtered or unexported fields
}
func NewWarmTransferTask ¶
func NewWarmTransferTask(targetPhone string, trunkId string, chatCtx *llm.ChatContext, extraInstructions string) (*WarmTransferTask, error)
func NewWarmTransferTaskWithOptions ¶ added in v0.0.15
func NewWarmTransferTaskWithOptions(opts WarmTransferOptions) (*WarmTransferTask, error)
func (*WarmTransferTask) ConnectToCaller ¶
func (t *WarmTransferTask) ConnectToCaller() error
func (*WarmTransferTask) OnEnter ¶
func (t *WarmTransferTask) OnEnter()
func (*WarmTransferTask) OnExit ¶
func (t *WarmTransferTask) OnExit()
Click to show internal directories.
Click to hide internal directories.