Documentation
¶
Index ¶
- Constants
- type ASRConfig
- type AdditionalFormat
- type Agent
- type AgentAccessRole
- type AgentAccessSource
- type AgentConfig
- type AgentConversation
- type AgentFilterFunc
- type AgentKnowledgeBaseLocator
- type AgentLink
- type AgentList
- type AgentMetadata
- type AgentPrompt
- type AgentSort
- type AgentSummary
- type AgentTTSConfig
- type Agents
- type AudioEffects
- type CallInitiationFailureData
- type CallSuccessful
- type Client
- type ClientSecretOption
- type Conversation
- type ConversationAnalysis
- type ConversationCallAnalysis
- type ConversationDirection
- type ConversationFeedback
- type ConversationFilterFunc
- type ConversationHistory
- type ConversationLinkToken
- type ConversationList
- type ConversationListItem
- type ConversationListItems
- type ConversationMetadata
- type ConversationSession
- type ConversationStatus
- type ConversationSummary
- type ConversationSummaryMessage
- type ConversationSummaryMode
- type ConversationToken
- type ConversationTokenOption
- type ConversationTranscriptTurn
- type ConversationTurn
- type ConversationalConfig
- type CreateAgentOption
- type CreateAgentResult
- type CreateKnowledgeFileOption
- type CreateKnowledgeResult
- type CreateKnowledgeTextOption
- type CreateKnowledgeURLOption
- func WithKnowledgeAutoRemove() CreateKnowledgeURLOption
- func WithKnowledgeAutoSync() CreateKnowledgeURLOption
- func WithKnowledgeMinFrequencyDays(days int) CreateKnowledgeURLOption
- func WithKnowledgeURLName(name string) CreateKnowledgeURLOption
- func WithKnowledgeURLParentFolderID(id string) CreateKnowledgeURLOption
- type CreateOrUpdateAgentResult
- type CreateToolOption
- type CreateWebhookOption
- type CreateWebhookResult
- type DeleteAgentOption
- type DeleteKnowledgeOption
- type DeleteToolOption
- type DependentAgent
- type DependentAgentList
- type DependentAgentType
- type DependentBranch
- type DetectedEntity
- type DuplicateAgentOption
- type EditedTranscript
- type EmbeddingModel
- type EntityRedactionMode
- type ExportFormat
- type FileFormat
- type FilterFunc
- type FineTuning
- type FineTuningState
- type FlowsGenerationData
- type GetAgentOption
- type GetConversationSummaryOption
- type GetKnowledgeChunkOption
- type GetKnowledgeOption
- type GetToolOption
- type KnowledgeChunk
- type KnowledgeContent
- type KnowledgeDependentOption
- type KnowledgeDocument
- type KnowledgeDocuments
- type KnowledgeFilterFunc
- type KnowledgeFolderPathSegment
- type KnowledgeList
- type KnowledgeMetadata
- type KnowledgeSort
- type KnowledgeType
- type KnowledgeUsage
- type LabellingStatus
- type Language
- type ListAgentsOption
- func WithAgentArchived() ListAgentsOption
- func WithAgentCursor(cursor string) ListAgentsOption
- func WithAgentPageSize(size int) ListAgentsOption
- func WithAgentSearch(search string) ListAgentsOption
- func WithAgentSort(sort AgentSort) ListAgentsOption
- func WithAgentSortDirection(direction SortDirection) ListAgentsOption
- func WithAgentTags(tags ...string) ListAgentsOption
- func WithCreatedByUserID(id string) ListAgentsOption
- type ListConversationsOption
- func WithCallStartAfterUnix(ts int64) ListConversationsOption
- func WithCallStartBeforeUnix(ts int64) ListConversationsOption
- func WithCallSuccessful(result CallSuccessful) ListConversationsOption
- func WithConversationAgentID(id string) ListConversationsOption
- func WithConversationBranchID(id string) ListConversationsOption
- func WithConversationCursor(cursor string) ListConversationsOption
- func WithConversationPageSize(size int) ListConversationsOption
- func WithConversationSortDirection(direction SortDirection) ListConversationsOption
- func WithConversationUserID(id string) ListConversationsOption
- func WithConversationVersionID(id string) ListConversationsOption
- func WithSummaryMode(mode ConversationSummaryMode) ListConversationsOption
- type ListKnowledgeOption
- func WithKnowledgeAncestorFolderID(id string) ListKnowledgeOption
- func WithKnowledgeCreatedByUserID(id string) ListKnowledgeOption
- func WithKnowledgeCursor(cursor string) ListKnowledgeOption
- func WithKnowledgeFoldersFirst() ListKnowledgeOption
- func WithKnowledgePageSize(size int) ListKnowledgeOption
- func WithKnowledgeParentFolderID(id string) ListKnowledgeOption
- func WithKnowledgeSearch(search string) ListKnowledgeOption
- func WithKnowledgeSort(sort KnowledgeSort) ListKnowledgeOption
- func WithKnowledgeSortDirection(direction SortDirection) ListKnowledgeOption
- func WithKnowledgeTypes(types ...KnowledgeType) ListKnowledgeOption
- type ListToolsOption
- func WithToolCreatedByUserID(id string) ListToolsOption
- func WithToolCursor(cursor string) ListToolsOption
- func WithToolPageSize(size int) ListToolsOption
- func WithToolSearch(search string) ListToolsOption
- func WithToolSort(sort ToolSort) ListToolsOption
- func WithToolSortDirection(direction SortDirection) ListToolsOption
- func WithToolTypes(types ...ToolType) ListToolsOption
- func WithToolUsedByAgentID(id string) ListToolsOption
- type ListWebhooksOption
- type ManualVerification
- type ManualVerificationFile
- type Model
- type ModelRates
- type Models
- type MultichannelOutputStyle
- type OutputFormat
- type PostCallAudioData
- type PostCallTranscriptionData
- type PronunciationDictionaryLocator
- type RAGDocumentIndexUsage
- type RAGIndex
- type RAGIndexStatus
- type ReaderResource
- type ReaderResourceType
- type RealtimeClientSecret
- type Recording
- type RecordingQuality
- type ResourceAccessInfo
- type ReviewStatus
- type SafetyControl
- type Sample
- type SearchVoicesOption
- func WithAccent(accent string) SearchVoicesOption
- func WithAge(age string) SearchVoicesOption
- func WithCategory(category VoiceCategory) SearchVoicesOption
- func WithCollectionId(collectionId string) SearchVoicesOption
- func WithFineTuningState(state FineTuningState) SearchVoicesOption
- func WithGender(gender string) SearchVoicesOption
- func WithHighQuality(highQuality bool) SearchVoicesOption
- func WithIncludeCustomRates(include bool) SearchVoicesOption
- func WithIncludeLiveModerated(include bool) SearchVoicesOption
- func WithIncludeTotalCount(include bool) SearchVoicesOption
- func WithLanguages(languages ...string) SearchVoicesOption
- func WithMinNoticePeriodDays(days int) SearchVoicesOption
- func WithNextPageToken(token string) SearchVoicesOption
- func WithPageSize(size int) SearchVoicesOption
- func WithSearch(search string) SearchVoicesOption
- func WithSort(sort VoiceSort) SearchVoicesOption
- func WithSortDirection(direction SortDirection) SearchVoicesOption
- func WithUseCases(useCases ...string) SearchVoicesOption
- func WithVoiceIds(voiceIds ...string) SearchVoicesOption
- func WithVoiceType(voiceType VoiceType) SearchVoicesOption
- type SessionAgentResponse
- type SessionAgentToolResponse
- type SessionAudio
- type SessionChatPart
- type SessionChatPartType
- type SessionClientError
- type SessionClientToolCall
- type SessionContextUsage
- type SessionCorrection
- type SessionEvent
- type SessionEventType
- type SessionGuardrail
- type SessionInitiation
- type SessionInterruption
- type SessionPing
- type SessionQueueStatus
- type SessionQueueStatusValue
- type SessionResponseComplete
- type SessionTranscript
- type SessionVAD
- type SignedURL
- type SignedURLOption
- type SoftTimeoutConfig
- type SortDirection
- type Speaker
- type SpeakerSeparation
- type SpeakerSeparationStatus
- type SpeechToSpeechOption
- func WithAudioFilename(name string) SpeechToSpeechOption
- func WithFileFormat(format FileFormat) SpeechToSpeechOption
- func WithRemoveBackgroundNoise() SpeechToSpeechOption
- func WithSpeechToSpeechModelId(modelId string) SpeechToSpeechOption
- func WithSpeechToSpeechOptimizeStreamingLatency(latency StreamingLatency) SpeechToSpeechOption
- func WithSpeechToSpeechOutputFormat(format OutputFormat) SpeechToSpeechOption
- func WithSpeechToSpeechSeed(seed int) SpeechToSpeechOption
- func WithSpeechToSpeechVoiceSettings(voiceSettings VoiceSettings) SpeechToSpeechOption
- func WithoutSpeechToSpeechEnableLogging() SpeechToSpeechOption
- type SpeechToTextCharacter
- type SpeechToTextFilterFunc
- type SpeechToTextOption
- func WithAdditionalFormats(formats ...TranscriptExportOptions) SpeechToTextOption
- func WithDetectSpeakerRoles() SpeechToTextOption
- func WithDiarizationThreshold(threshold float64) SpeechToTextOption
- func WithDiarize() SpeechToTextOption
- func WithEntityDetection(values ...string) SpeechToTextOption
- func WithEntityRedaction(values ...string) SpeechToTextOption
- func WithEntityRedactionMode(mode EntityRedactionMode) SpeechToTextOption
- func WithKeyterms(terms ...string) SpeechToTextOption
- func WithMultichannelOutputStyle(style MultichannelOutputStyle) SpeechToTextOption
- func WithNoVerbatim() SpeechToTextOption
- func WithNumSpeakers(n int) SpeechToTextOption
- func WithSourceURL(url string) SpeechToTextOption
- func WithSpeechToTextAudioFilename(name string) SpeechToTextOption
- func WithSpeechToTextFileFormat(format FileFormat) SpeechToTextOption
- func WithSpeechToTextLanguageCode(languageCode string) SpeechToTextOption
- func WithSpeechToTextModelId(modelId string) SpeechToTextOption
- func WithSpeechToTextSeed(seed int) SpeechToTextOption
- func WithSpeechToTextTemperature(temperature float64) SpeechToTextOption
- func WithSpeechToTextToken(token string) SpeechToTextOption
- func WithSpeechToTextWebhook() SpeechToTextOption
- func WithSpeechToTextWebhookID(webhookID string) SpeechToTextOption
- func WithSpeechToTextWebhookMetadata(metadata any) SpeechToTextOption
- func WithTagAudioEvents() SpeechToTextOption
- func WithTimestampsGranularity(granularity TimestampsGranularity) SpeechToTextOption
- func WithTranscriptEdit(instruction string) SpeechToTextOption
- func WithUseMultiChannel() SpeechToTextOption
- func WithUseSpeakerLibrary() SpeechToTextOption
- func WithoutSpeechToTextEnableLogging() SpeechToTextOption
- func WithoutTagAudioEvents() SpeechToTextOption
- type SpeechToTextResult
- type SpeechToTextTranscript
- type SpeechToTextTranscriptionData
- type SpeechToTextTranscripts
- type SpeechToTextWord
- type SpeechToTextWordType
- type StartConversationOption
- func WithSessionBranchID(id string) StartConversationOption
- func WithSessionConfigOverride(config json.RawMessage) StartConversationOption
- func WithSessionDynamicVariables(vars json.RawMessage) StartConversationOption
- func WithSessionEventBuffer(n int) StartConversationOption
- func WithSessionExtraBody(body json.RawMessage) StartConversationOption
- func WithSessionSignedURL() StartConversationOption
- func WithSessionURL(rawURL string) StartConversationOption
- func WithSessionUserID(id string) StartConversationOption
- func WithSessionVersionID(id string) StartConversationOption
- type StreamingLatency
- type TextNormalization
- type TextToSpeechOption
- func WithApplyLanguageTextNormalization() TextToSpeechOption
- func WithApplyTextNormalization(mode TextNormalization) TextToSpeechOption
- func WithAudioEffects(effects AudioEffects) TextToSpeechOption
- func WithLanguageCode(languageCode string) TextToSpeechOption
- func WithModelId(modelId string) TextToSpeechOption
- func WithNextRequestIds(ids ...string) TextToSpeechOption
- func WithNextText(text string) TextToSpeechOption
- func WithOptimizeStreamingLatency(latency StreamingLatency) TextToSpeechOption
- func WithOutputFormat(format OutputFormat) TextToSpeechOption
- func WithPreviousRequestIds(ids ...string) TextToSpeechOption
- func WithPreviousText(text string) TextToSpeechOption
- func WithPronunciationDictionaryLocators(locators ...PronunciationDictionaryLocator) TextToSpeechOption
- func WithSeed(seed int) TextToSpeechOption
- func WithUsePvcAsIvc(use bool) TextToSpeechOption
- func WithVoiceSettings(voiceSettings VoiceSettings) TextToSpeechOption
- func WithoutEnableLogging() TextToSpeechOption
- type TimestampsGranularity
- type Tool
- type ToolCallSound
- type ToolCallSoundBehavior
- type ToolConfig
- type ToolDependentOption
- type ToolErrorHandlingMode
- type ToolExecutionMode
- type ToolFilterFunc
- type ToolInterruptionMode
- type ToolList
- type ToolPreSpeech
- type ToolSort
- type ToolType
- type ToolUsageStats
- type Tools
- type TranscriptExportOptions
- type TurnConfig
- type UpdateAgentOption
- func WithUpdateAgentBranchID(id string) UpdateAgentOption
- func WithUpdateAgentName(name string) UpdateAgentOption
- func WithUpdateAgentTags(tags ...string) UpdateAgentOption
- func WithUpdateAgentWorkflow(workflow json.RawMessage) UpdateAgentOption
- func WithUpdateConversationConfig(config ConversationalConfig) UpdateAgentOption
- func WithUpdatePlatformSettings(settings json.RawMessage) UpdateAgentOption
- func WithVersionDescription(description string) UpdateAgentOption
- func WithoutUpdateProcedureGeneratedWorkflow() UpdateAgentOption
- type UpdateKnowledgeOption
- type UpdateToolOption
- type UpdateWebhookOption
- type Utterance
- type VerificationAttempt
- type VerifiedLanguage
- type Voice
- type VoiceCategory
- type VoiceFilterFunc
- type VoiceSearchResult
- type VoiceSettings
- type VoiceSharing
- type VoiceSharingModerationCheck
- type VoiceSharingStatus
- type VoiceSort
- type VoiceType
- type VoiceVerification
- type Voices
- type Webhook
- type WebhookAPISchema
- type WebhookAuthType
- type WebhookEvent
- type WebhookEventType
- type WebhookFilterFunc
- type WebhookList
- type WebhookStatusResult
- type WebhookSubscriptionEvent
- type WebhookUsage
- type WebhookUsageType
- type Webhooks
Constants ¶
const (
WebhookSignatureHeader = "ElevenLabs-Signature"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalFormat ¶ added in v0.0.3
type Agent ¶ added in v0.0.3
type Agent struct {
AgentID string `json:"agent_id"`
Name string `json:"name"`
ConversationConfig ConversationalConfig `json:"conversation_config"`
Metadata AgentMetadata `json:"metadata"`
PlatformSettings json.RawMessage `json:"platform_settings,omitempty"`
PhoneNumbers json.RawMessage `json:"phone_numbers,omitempty"`
WhatsAppAccounts json.RawMessage `json:"whatsapp_accounts,omitempty"`
Workflow json.RawMessage `json:"workflow,omitempty"`
AccessInfo *ResourceAccessInfo `json:"access_info,omitempty"`
Tags []string `json:"tags,omitempty"`
VersionID string `json:"version_id,omitempty"`
BranchID string `json:"branch_id,omitempty"`
MainBranchID string `json:"main_branch_id,omitempty"`
Procedures json.RawMessage `json:"procedures,omitempty"`
DefaultHoldAudioURL string `json:"default_hold_audio_url,omitempty"`
}
type AgentAccessRole ¶ added in v0.0.3
type AgentAccessRole string
const ( AgentAccessRoleAdmin AgentAccessRole = "admin" AgentAccessRoleEditor AgentAccessRole = "editor" AgentAccessRoleCommenter AgentAccessRole = "commenter" AgentAccessRoleViewer AgentAccessRole = "viewer" )
func (AgentAccessRole) String ¶ added in v0.0.3
func (r AgentAccessRole) String() string
type AgentAccessSource ¶ added in v0.0.3
type AgentAccessSource string
const ( AgentAccessSourceCreator AgentAccessSource = "creator" AgentAccessSourceExplicit AgentAccessSource = "explicit" AgentAccessSourceWorkspaceAdmin AgentAccessSource = "workspace_admin" AgentAccessSourceWorkspaceDefault AgentAccessSource = "workspace_default" )
func (AgentAccessSource) String ¶ added in v0.0.3
func (s AgentAccessSource) String() string
type AgentConfig ¶ added in v0.0.3
type AgentConfig struct {
FirstMessage string `json:"first_message,omitempty"`
Language string `json:"language,omitempty"`
Prompt *AgentPrompt `json:"prompt,omitempty"`
DynamicVariablePlaceholders map[string]string `json:"dynamic_variable_placeholders,omitempty"`
}
type AgentConversation ¶ added in v0.0.3
type AgentFilterFunc ¶ added in v0.0.3
type AgentFilterFunc func(*AgentSummary) bool
type AgentKnowledgeBaseLocator ¶ added in v0.0.3
type AgentKnowledgeBaseLocator struct {
Type KnowledgeType `json:"type"`
Name string `json:"name"`
ID string `json:"id"`
UsageMode KnowledgeUsage `json:"usage_mode,omitempty"`
}
type AgentLink ¶ added in v0.0.3
type AgentLink struct {
AgentID string `json:"agent_id"`
Token *ConversationLinkToken `json:"token,omitempty"`
}
type AgentMetadata ¶ added in v0.0.3
type AgentPrompt ¶ added in v0.0.3
type AgentPrompt struct {
Prompt string `json:"prompt,omitempty"`
LLM string `json:"llm,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
MaxTokens *int `json:"max_tokens,omitempty"`
ToolIDs []string `json:"tool_ids,omitempty"`
MCPServerIDs []string `json:"mcp_server_ids,omitempty"`
KnowledgeBase []AgentKnowledgeBaseLocator `json:"knowledge_base,omitempty"`
RAG json.RawMessage `json:"rag,omitempty"`
}
type AgentSummary ¶ added in v0.0.3
type AgentSummary struct {
AgentID string `json:"agent_id"`
Name string `json:"name"`
VoiceID string `json:"voice_id"`
Tags []string `json:"tags"`
CreatedAtUnixSecs int64 `json:"created_at_unix_secs"`
UpdatedAtUnixSecs int64 `json:"updated_at_unix_secs"`
AccessInfo ResourceAccessInfo `json:"access_info"`
LastCallTimeUnixSecs *int64 `json:"last_call_time_unix_secs"`
Archived bool `json:"archived"`
}
type AgentTTSConfig ¶ added in v0.0.3
type AgentTTSConfig struct {
ModelID string `json:"model_id,omitempty"`
VoiceID string `json:"voice_id,omitempty"`
AgentOutputAudioFormat string `json:"agent_output_audio_format,omitempty"`
Stability *float64 `json:"stability,omitempty"`
Speed *float64 `json:"speed,omitempty"`
SimilarityBoost *float64 `json:"similarity_boost,omitempty"`
ExpressiveMode *bool `json:"expressive_mode,omitempty"`
}
type Agents ¶ added in v0.0.3
type Agents []AgentSummary
func (Agents) AllWith ¶ added in v0.0.3
func (a Agents) AllWith(filters ...AgentFilterFunc) iter.Seq[AgentSummary]
type AudioEffects ¶
type AudioEffects struct {
FilterPresetId string `json:"filter_preset_id,omitempty"`
Distance float64 `json:"distance,omitempty"`
EnvironmentId string `json:"environment_id,omitempty"`
BackgroundNoiseId string `json:"background_noise_id,omitempty"`
SendLevel float64 `json:"send_level,omitempty"`
Pan float64 `json:"pan,omitempty"`
}
type CallInitiationFailureData ¶ added in v0.0.2
type CallInitiationFailureData struct {
AgentID string `json:"agent_id"`
ConversationID string `json:"conversation_id"`
FailureReason string `json:"failure_reason"`
Metadata json.RawMessage `json:"metadata"`
}
type CallSuccessful ¶ added in v0.0.3
type CallSuccessful string
const ( CallSuccessfulSuccess CallSuccessful = "success" CallSuccessfulFailure CallSuccessful = "failure" CallSuccessfulUnknown CallSuccessful = "unknown" CallSuccessfulError CallSuccessful = "error" )
func (CallSuccessful) String ¶ added in v0.0.3
func (s CallSuccessful) String() string
type Client ¶
type Client interface {
ListModels() (Models, error)
ListModelsWithContext(context.Context) (Models, error)
SearchVoices(options ...SearchVoicesOption) (VoiceSearchResult, error)
SearchVoicesWithContext(ctx context.Context, options ...SearchVoicesOption) (VoiceSearchResult, error)
TextToSpeech(text string, voiceId string, options ...TextToSpeechOption) ([]byte, error)
TextToSpeechWithContext(ctx context.Context, text string, voiceId string, options ...TextToSpeechOption) ([]byte, error)
TextToSpeechStream(text string, voiceId string, options ...TextToSpeechOption) (io.ReadCloser, error)
TextToSpeechStreamWithContext(ctx context.Context, text string, voiceId string, options ...TextToSpeechOption) (io.ReadCloser, error)
SpeechToSpeech(audio io.Reader, voiceId string, options ...SpeechToSpeechOption) ([]byte, error)
SpeechToSpeechWithContext(ctx context.Context, audio io.Reader, voiceId string, options ...SpeechToSpeechOption) ([]byte, error)
SpeechToSpeechStream(audio io.Reader, voiceId string, options ...SpeechToSpeechOption) (io.ReadCloser, error)
SpeechToSpeechStreamWithContext(ctx context.Context, audio io.Reader, voiceId string, options ...SpeechToSpeechOption) (io.ReadCloser, error)
SpeechToText(audio io.Reader, options ...SpeechToTextOption) (SpeechToTextResult, error)
SpeechToTextWithContext(ctx context.Context, audio io.Reader, options ...SpeechToTextOption) (SpeechToTextResult, error)
GetTranscript(transcriptionID string) (SpeechToTextResult, error)
GetTranscriptWithContext(ctx context.Context, transcriptionID string) (SpeechToTextResult, error)
DeleteTranscript(transcriptionID string) error
DeleteTranscriptWithContext(ctx context.Context, transcriptionID string) error
ListAgents(options ...ListAgentsOption) (AgentList, error)
ListAgentsWithContext(ctx context.Context, options ...ListAgentsOption) (AgentList, error)
CreateAgent(config ConversationalConfig, options ...CreateAgentOption) (CreateAgentResult, error)
CreateAgentWithContext(ctx context.Context, config ConversationalConfig, options ...CreateAgentOption) (CreateAgentResult, error)
CreateOrUpdateAgent(config ConversationalConfig, options ...CreateAgentOption) (CreateOrUpdateAgentResult, error)
CreateOrUpdateAgentWithContext(ctx context.Context, config ConversationalConfig, options ...CreateAgentOption) (CreateOrUpdateAgentResult, error)
GetAgent(agentID string, options ...GetAgentOption) (Agent, error)
GetAgentWithContext(ctx context.Context, agentID string, options ...GetAgentOption) (Agent, error)
UpdateAgent(agentID string, options ...UpdateAgentOption) (Agent, error)
UpdateAgentWithContext(ctx context.Context, agentID string, options ...UpdateAgentOption) (Agent, error)
DeleteAgent(agentID string, options ...DeleteAgentOption) error
DeleteAgentWithContext(ctx context.Context, agentID string, options ...DeleteAgentOption) error
DuplicateAgent(agentID string, options ...DuplicateAgentOption) (CreateAgentResult, error)
DuplicateAgentWithContext(ctx context.Context, agentID string, options ...DuplicateAgentOption) (CreateAgentResult, error)
GetAgentLink(agentID string) (AgentLink, error)
GetAgentLinkWithContext(ctx context.Context, agentID string) (AgentLink, error)
ListConversations(options ...ListConversationsOption) (ConversationList, error)
ListConversationsWithContext(ctx context.Context, options ...ListConversationsOption) (ConversationList, error)
GetConversation(conversationID string) (Conversation, error)
GetConversationWithContext(ctx context.Context, conversationID string) (Conversation, error)
GetConversationSummary(conversationID string, options ...GetConversationSummaryOption) (ConversationSummary, error)
GetConversationSummaryWithContext(ctx context.Context, conversationID string, options ...GetConversationSummaryOption) (ConversationSummary, error)
DeleteConversation(conversationID string) error
DeleteConversationWithContext(ctx context.Context, conversationID string) error
GetConversationAudio(conversationID string) ([]byte, error)
GetConversationAudioWithContext(ctx context.Context, conversationID string) ([]byte, error)
GetSignedURL(agentID string, options ...SignedURLOption) (SignedURL, error)
GetSignedURLWithContext(ctx context.Context, agentID string, options ...SignedURLOption) (SignedURL, error)
GetConversationToken(agentID string, options ...ConversationTokenOption) (ConversationToken, error)
GetConversationTokenWithContext(ctx context.Context, agentID string, options ...ConversationTokenOption) (ConversationToken, error)
SendConversationFeedback(conversationID string, feedback ConversationFeedback) error
SendConversationFeedbackWithContext(ctx context.Context, conversationID string, feedback ConversationFeedback) error
CreateRealtimeClientSecret(options ...ClientSecretOption) (RealtimeClientSecret, error)
CreateRealtimeClientSecretWithContext(ctx context.Context, options ...ClientSecretOption) (RealtimeClientSecret, error)
StartConversation(agentID string, options ...StartConversationOption) (ConversationSession, error)
StartConversationWithContext(ctx context.Context, agentID string, options ...StartConversationOption) (ConversationSession, error)
ListTools(options ...ListToolsOption) (ToolList, error)
ListToolsWithContext(ctx context.Context, options ...ListToolsOption) (ToolList, error)
CreateTool(config ToolConfig, options ...CreateToolOption) (Tool, error)
CreateToolWithContext(ctx context.Context, config ToolConfig, options ...CreateToolOption) (Tool, error)
GetTool(toolID string, options ...GetToolOption) (Tool, error)
GetToolWithContext(ctx context.Context, toolID string, options ...GetToolOption) (Tool, error)
UpdateTool(toolID string, config ToolConfig, options ...UpdateToolOption) (Tool, error)
UpdateToolWithContext(ctx context.Context, toolID string, config ToolConfig, options ...UpdateToolOption) (Tool, error)
DeleteTool(toolID string, options ...DeleteToolOption) error
DeleteToolWithContext(ctx context.Context, toolID string, options ...DeleteToolOption) error
GetToolDependentAgents(toolID string, options ...ToolDependentOption) (DependentAgentList, error)
GetToolDependentAgentsWithContext(ctx context.Context, toolID string, options ...ToolDependentOption) (DependentAgentList, error)
ListKnowledgeBase(options ...ListKnowledgeOption) (KnowledgeList, error)
ListKnowledgeBaseWithContext(ctx context.Context, options ...ListKnowledgeOption) (KnowledgeList, error)
CreateKnowledgeBaseText(text string, options ...CreateKnowledgeTextOption) (CreateKnowledgeResult, error)
CreateKnowledgeBaseTextWithContext(ctx context.Context, text string, options ...CreateKnowledgeTextOption) (CreateKnowledgeResult, error)
CreateKnowledgeBaseURL(pageURL string, options ...CreateKnowledgeURLOption) (CreateKnowledgeResult, error)
CreateKnowledgeBaseURLWithContext(ctx context.Context, pageURL string, options ...CreateKnowledgeURLOption) (CreateKnowledgeResult, error)
CreateKnowledgeBaseFile(file io.Reader, options ...CreateKnowledgeFileOption) (CreateKnowledgeResult, error)
CreateKnowledgeBaseFileWithContext(ctx context.Context, file io.Reader, options ...CreateKnowledgeFileOption) (CreateKnowledgeResult, error)
GetKnowledgeBase(documentationID string, options ...GetKnowledgeOption) (KnowledgeDocument, error)
GetKnowledgeBaseWithContext(ctx context.Context, documentationID string, options ...GetKnowledgeOption) (KnowledgeDocument, error)
UpdateKnowledgeBase(documentationID string, options ...UpdateKnowledgeOption) (KnowledgeDocument, error)
UpdateKnowledgeBaseWithContext(ctx context.Context, documentationID string, options ...UpdateKnowledgeOption) (KnowledgeDocument, error)
DeleteKnowledgeBase(documentationID string, options ...DeleteKnowledgeOption) error
DeleteKnowledgeBaseWithContext(ctx context.Context, documentationID string, options ...DeleteKnowledgeOption) error
GetKnowledgeBaseContent(documentationID string) (KnowledgeContent, error)
GetKnowledgeBaseContentWithContext(ctx context.Context, documentationID string) (KnowledgeContent, error)
GetKnowledgeBaseDependentAgents(documentationID string, options ...KnowledgeDependentOption) (DependentAgentList, error)
GetKnowledgeBaseDependentAgentsWithContext(ctx context.Context, documentationID string, options ...KnowledgeDependentOption) (DependentAgentList, error)
ComputeRAGIndex(documentationID string, model EmbeddingModel) (RAGIndex, error)
ComputeRAGIndexWithContext(ctx context.Context, documentationID string, model EmbeddingModel) (RAGIndex, error)
GetKnowledgeBaseChunk(documentationID string, chunkID string, options ...GetKnowledgeChunkOption) (KnowledgeChunk, error)
GetKnowledgeBaseChunkWithContext(ctx context.Context, documentationID string, chunkID string, options ...GetKnowledgeChunkOption) (KnowledgeChunk, error)
ListWebhooks(options ...ListWebhooksOption) (WebhookList, error)
ListWebhooksWithContext(ctx context.Context, options ...ListWebhooksOption) (WebhookList, error)
CreateWebhook(name string, webhookURL string, options ...CreateWebhookOption) (CreateWebhookResult, error)
CreateWebhookWithContext(ctx context.Context, name string, webhookURL string, options ...CreateWebhookOption) (CreateWebhookResult, error)
UpdateWebhook(webhookID string, name string, isDisabled bool, options ...UpdateWebhookOption) (WebhookStatusResult, error)
UpdateWebhookWithContext(ctx context.Context, webhookID string, name string, isDisabled bool, options ...UpdateWebhookOption) (WebhookStatusResult, error)
DeleteWebhook(webhookID string) (WebhookStatusResult, error)
DeleteWebhookWithContext(ctx context.Context, webhookID string) (WebhookStatusResult, error)
}
type ClientSecretOption ¶ added in v0.0.3
type ClientSecretOption func(*clientSecretOption)
func WithRealtimeExpiresAfter ¶ added in v0.0.3
func WithRealtimeExpiresAfter(seconds int) ClientSecretOption
Lifetime of the client secret in seconds, anchored at created_at.
func WithRealtimeSession ¶ added in v0.0.3
func WithRealtimeSession(session json.RawMessage) ClientSecretOption
OpenAI-compatible Realtime session config as pass-through JSON.
type Conversation ¶ added in v0.0.3
type Conversation struct {
AgentID string `json:"agent_id"`
ConversationID string `json:"conversation_id"`
Status ConversationStatus `json:"status"`
Metadata ConversationHistory `json:"metadata"`
Transcript []ConversationTranscriptTurn `json:"transcript"`
HasAudio bool `json:"has_audio"`
HasUserAudio bool `json:"has_user_audio"`
HasResponseAudio bool `json:"has_response_audio"`
HasAuxiliaryAudio bool `json:"has_auxiliary_audio"`
AgentName string `json:"agent_name,omitempty"`
UserID string `json:"user_id,omitempty"`
BranchID string `json:"branch_id,omitempty"`
VersionID string `json:"version_id,omitempty"`
Environment string `json:"environment,omitempty"`
Analysis *ConversationCallAnalysis `json:"analysis,omitempty"`
ConversationInitiationClientData json.RawMessage `json:"conversation_initiation_client_data,omitempty"`
TagIDs []string `json:"tag_ids,omitempty"`
}
type ConversationAnalysis ¶ added in v0.0.2
type ConversationAnalysis struct {
EvaluationCriteriaResults json.RawMessage `json:"evaluation_criteria_results"`
DataCollectionResults json.RawMessage `json:"data_collection_results"`
CallSuccessful string `json:"call_successful"`
TranscriptSummary string `json:"transcript_summary"`
}
type ConversationCallAnalysis ¶ added in v0.0.3
type ConversationCallAnalysis struct {
CallSuccessful CallSuccessful `json:"call_successful"`
TranscriptSummary string `json:"transcript_summary"`
CallSummaryTitle string `json:"call_summary_title,omitempty"`
EvaluationCriteriaResults json.RawMessage `json:"evaluation_criteria_results,omitempty"`
DataCollectionResults json.RawMessage `json:"data_collection_results,omitempty"`
}
type ConversationDirection ¶ added in v0.0.3
type ConversationDirection string
const ( ConversationDirectionInbound ConversationDirection = "inbound" ConversationDirectionOutbound ConversationDirection = "outbound" )
func (ConversationDirection) String ¶ added in v0.0.3
func (d ConversationDirection) String() string
type ConversationFeedback ¶ added in v0.0.3
type ConversationFeedback string
const ( ConversationFeedbackLike ConversationFeedback = "like" ConversationFeedbackDislike ConversationFeedback = "dislike" )
func (ConversationFeedback) String ¶ added in v0.0.3
func (f ConversationFeedback) String() string
type ConversationFilterFunc ¶ added in v0.0.3
type ConversationFilterFunc func(*ConversationListItem) bool
type ConversationHistory ¶ added in v0.0.3
type ConversationHistory struct {
StartTimeUnixSecs int64 `json:"start_time_unix_secs"`
CallDurationSecs int `json:"call_duration_secs"`
Cost *int `json:"cost,omitempty"`
TerminationReason string `json:"termination_reason,omitempty"`
AuthorizationMethod string `json:"authorization_method,omitempty"`
MainLanguage string `json:"main_language,omitempty"`
TextOnly bool `json:"text_only,omitempty"`
Feedback json.RawMessage `json:"feedback,omitempty"`
Charging json.RawMessage `json:"charging,omitempty"`
PhoneCall json.RawMessage `json:"phone_call,omitempty"`
Error json.RawMessage `json:"error,omitempty"`
}
type ConversationLinkToken ¶ added in v0.0.3
type ConversationLinkToken struct {
AgentID string `json:"agent_id"`
ConversationToken string `json:"conversation_token"`
Purpose string `json:"purpose"`
ExpirationTimeUnixSecs *int64 `json:"expiration_time_unix_secs"`
ConversationID string `json:"conversation_id,omitempty"`
TokenRequesterUserID string `json:"token_requester_user_id,omitempty"`
}
type ConversationList ¶ added in v0.0.3
type ConversationList struct {
Conversations ConversationListItems `json:"conversations"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor"`
}
type ConversationListItem ¶ added in v0.0.3
type ConversationListItem struct {
AgentID string `json:"agent_id"`
ConversationID string `json:"conversation_id"`
StartTimeUnixSecs int64 `json:"start_time_unix_secs"`
CallDurationSecs int `json:"call_duration_secs"`
MessageCount int `json:"message_count"`
Status ConversationStatus `json:"status"`
CallSuccessful CallSuccessful `json:"call_successful"`
BranchID string `json:"branch_id,omitempty"`
VersionID string `json:"version_id,omitempty"`
AgentName string `json:"agent_name,omitempty"`
TerminationReason string `json:"termination_reason,omitempty"`
TranscriptSummary string `json:"transcript_summary,omitempty"`
CallSummaryTitle string `json:"call_summary_title,omitempty"`
MainLanguage string `json:"main_language,omitempty"`
ConversationInitiationSource string `json:"conversation_initiation_source,omitempty"`
Direction ConversationDirection `json:"direction,omitempty"`
Rating *float64 `json:"rating,omitempty"`
ToolNames []string `json:"tool_names,omitempty"`
TagIDs []string `json:"tag_ids,omitempty"`
}
type ConversationListItems ¶ added in v0.0.3
type ConversationListItems []ConversationListItem
func (ConversationListItems) All ¶ added in v0.0.3
func (c ConversationListItems) All() iter.Seq[ConversationListItem]
func (ConversationListItems) AllWith ¶ added in v0.0.3
func (c ConversationListItems) AllWith(filters ...ConversationFilterFunc) iter.Seq[ConversationListItem]
type ConversationMetadata ¶ added in v0.0.2
type ConversationMetadata struct {
StartTimeUnixSecs int64 `json:"start_time_unix_secs"`
CallDurationSecs int `json:"call_duration_secs"`
Cost int `json:"cost"`
DeletionSettings json.RawMessage `json:"deletion_settings"`
Feedback json.RawMessage `json:"feedback"`
AuthorizationMethod string `json:"authorization_method"`
Charging json.RawMessage `json:"charging"`
TerminationReason string `json:"termination_reason"`
}
type ConversationSession ¶ added in v0.0.3
type ConversationSession interface {
Events() <-chan SessionEvent
ConversationID() string
SendUserMessage(text string) error
SendAudio(pcm []byte) error
SendContextualUpdate(text string) error
SendUserActivity() error
SendClientToolResult(toolCallID string, result any, isError bool) error
SendFeedback(eventID int, feedback ConversationFeedback) error
Close() error
Err() error
}
type ConversationStatus ¶ added in v0.0.3
type ConversationStatus string
const ( ConversationStatusInitiated ConversationStatus = "initiated" ConversationStatusInProgress ConversationStatus = "in-progress" ConversationStatusProcessing ConversationStatus = "processing" ConversationStatusDone ConversationStatus = "done" ConversationStatusFailed ConversationStatus = "failed" )
func (ConversationStatus) String ¶ added in v0.0.3
func (s ConversationStatus) String() string
type ConversationSummary ¶ added in v0.0.3
type ConversationSummary struct {
ConversationID string `json:"conversation_id"`
AgentID string `json:"agent_id"`
Status ConversationStatus `json:"status"`
MessageCount int `json:"message_count"`
Note string `json:"note"`
CallSummaryTitle string `json:"call_summary_title,omitempty"`
TranscriptSummary string `json:"transcript_summary,omitempty"`
CallSuccessful CallSuccessful `json:"call_successful,omitempty"`
Messages []ConversationSummaryMessage `json:"messages,omitempty"`
MessagesOmitted bool `json:"messages_omitted"`
}
type ConversationSummaryMessage ¶ added in v0.0.3
type ConversationSummaryMode ¶ added in v0.0.3
type ConversationSummaryMode string
const ( ConversationSummaryExclude ConversationSummaryMode = "exclude" ConversationSummaryInclude ConversationSummaryMode = "include" )
func (ConversationSummaryMode) String ¶ added in v0.0.3
func (m ConversationSummaryMode) String() string
type ConversationToken ¶ added in v0.0.3
type ConversationTokenOption ¶ added in v0.0.3
type ConversationTokenOption func(*conversationTokenOption)
func WithParticipantName ¶ added in v0.0.3
func WithParticipantName(name string) ConversationTokenOption
Optional custom participant name. If not provided, user ID will be used.
func WithTokenBranchID ¶ added in v0.0.3
func WithTokenBranchID(id string) ConversationTokenOption
The ID of the branch to use.
func WithTokenEnvironment ¶ added in v0.0.3
func WithTokenEnvironment(env string) ConversationTokenOption
The environment to use for resolving environment variables (e.g. production, staging). Defaults to production.
func WithTokenVersionID ¶ added in v0.0.3
func WithTokenVersionID(id string) ConversationTokenOption
The ID of the version to use.
type ConversationTranscriptTurn ¶ added in v0.0.3
type ConversationTranscriptTurn struct {
Role string `json:"role"`
Message string `json:"message,omitempty"`
TimeInCallSecs int `json:"time_in_call_secs"`
Interrupted bool `json:"interrupted,omitempty"`
ToolCalls json.RawMessage `json:"tool_calls,omitempty"`
ToolResults json.RawMessage `json:"tool_results,omitempty"`
Feedback json.RawMessage `json:"feedback,omitempty"`
}
type ConversationTurn ¶ added in v0.0.2
type ConversationTurn struct {
Role string `json:"role"`
Message string `json:"message"`
ToolCalls json.RawMessage `json:"tool_calls"`
ToolResults json.RawMessage `json:"tool_results"`
Feedback json.RawMessage `json:"feedback"`
TimeInCallSecs int `json:"time_in_call_secs"`
ConversationTurnMetrics json.RawMessage `json:"conversation_turn_metrics"`
}
type ConversationalConfig ¶ added in v0.0.3
type ConversationalConfig struct {
ASR *ASRConfig `json:"asr,omitempty"`
Turn *TurnConfig `json:"turn,omitempty"`
TTS *AgentTTSConfig `json:"tts,omitempty"`
Conversation *AgentConversation `json:"conversation,omitempty"`
LanguagePresets json.RawMessage `json:"language_presets,omitempty"`
VAD json.RawMessage `json:"vad,omitempty"`
Agent *AgentConfig `json:"agent,omitempty"`
}
type CreateAgentOption ¶ added in v0.0.3
type CreateAgentOption func(*createAgentOption)
func WithAgentName ¶ added in v0.0.3
func WithAgentName(name string) CreateAgentOption
A name to make the agent easier to find.
func WithAgentWorkflow ¶ added in v0.0.3
func WithAgentWorkflow(workflow json.RawMessage) CreateAgentOption
Workflow for the agent. Pass through JSON for the node and edge graph.
func WithCreateAgentTags ¶ added in v0.0.3
func WithCreateAgentTags(tags ...string) CreateAgentOption
Tags to help classify and filter the agent.
func WithPlatformSettings ¶ added in v0.0.3
func WithPlatformSettings(settings json.RawMessage) CreateAgentOption
Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. Pass through JSON.
type CreateAgentResult ¶ added in v0.0.3
type CreateAgentResult struct {
AgentID string `json:"agent_id"`
}
type CreateKnowledgeFileOption ¶ added in v0.0.3
type CreateKnowledgeFileOption func(*createKnowledgeFileOption)
func WithKnowledgeFileName ¶ added in v0.0.3
func WithKnowledgeFileName(name string) CreateKnowledgeFileOption
A custom, human-readable name for the document.
func WithKnowledgeFileParentFolderID ¶ added in v0.0.3
func WithKnowledgeFileParentFolderID(id string) CreateKnowledgeFileOption
If set, the created document is placed inside the given folder.
func WithKnowledgeFilename ¶ added in v0.0.3
func WithKnowledgeFilename(filename string) CreateKnowledgeFileOption
Filename sent with the multipart file part. Defaults to the os.File name when available, otherwise "document".
type CreateKnowledgeResult ¶ added in v0.0.3
type CreateKnowledgeResult struct {
ID string `json:"id"`
Name string `json:"name"`
FolderPath []KnowledgeFolderPathSegment `json:"folder_path,omitempty"`
}
type CreateKnowledgeTextOption ¶ added in v0.0.3
type CreateKnowledgeTextOption func(*createKnowledgeTextOption)
func WithKnowledgeName ¶ added in v0.0.3
func WithKnowledgeName(name string) CreateKnowledgeTextOption
A custom, human-readable name for the document.
func WithKnowledgeTextParentFolderID ¶ added in v0.0.3
func WithKnowledgeTextParentFolderID(id string) CreateKnowledgeTextOption
If set, the created document is placed inside the given folder.
type CreateKnowledgeURLOption ¶ added in v0.0.3
type CreateKnowledgeURLOption func(*createKnowledgeURLOption)
func WithKnowledgeAutoRemove ¶ added in v0.0.3
func WithKnowledgeAutoRemove() CreateKnowledgeURLOption
Whether to automatically remove the document if the URL becomes unavailable. Only used when auto-sync is enabled.
func WithKnowledgeAutoSync ¶ added in v0.0.3
func WithKnowledgeAutoSync() CreateKnowledgeURLOption
Whether to enable auto-sync for this URL document. Sends enable_auto_sync=true.
func WithKnowledgeMinFrequencyDays ¶ added in v0.0.3
func WithKnowledgeMinFrequencyDays(days int) CreateKnowledgeURLOption
Minimum frequency (in days) at which the document is refreshed. Defaults to 7.
func WithKnowledgeURLName ¶ added in v0.0.3
func WithKnowledgeURLName(name string) CreateKnowledgeURLOption
A custom, human-readable name for the document.
func WithKnowledgeURLParentFolderID ¶ added in v0.0.3
func WithKnowledgeURLParentFolderID(id string) CreateKnowledgeURLOption
If set, the created document is placed inside the given folder.
type CreateOrUpdateAgentResult ¶ added in v0.0.5
type CreateOrUpdateAgentResult struct {
AgentID string `json:"agent_id"`
Created bool `json:"created"`
}
CreateOrUpdateAgentResult is returned by CreateOrUpdateAgent. Created is true when the call inserted a new agent.
type CreateToolOption ¶ added in v0.0.3
type CreateToolOption func(*createToolOption)
func WithToolResponseMocks ¶ added in v0.0.3
func WithToolResponseMocks(mocks json.RawMessage) CreateToolOption
Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins.
type CreateWebhookOption ¶ added in v0.0.2
type CreateWebhookOption func(*createWebhookOption)
func WithWebhookRequestHeaders ¶ added in v0.0.2
func WithWebhookRequestHeaders(headers map[string]string) CreateWebhookOption
Optional custom request headers to include with each webhook delivery. Headers are write-only and are not returned by ListWebhooks.
type CreateWebhookResult ¶ added in v0.0.2
type DeleteAgentOption ¶ added in v0.0.3
type DeleteAgentOption func(*deleteAgentOption)
func WithForceDeleteAgent ¶ added in v0.0.3
func WithForceDeleteAgent() DeleteAgentOption
If set to true, the agent is deleted even if other agents use it as a subagent, and it is removed from those agents and their branches.
type DeleteKnowledgeOption ¶ added in v0.0.3
type DeleteKnowledgeOption func(*deleteKnowledgeOption)
func WithForceDeleteKnowledge ¶ added in v0.0.3
func WithForceDeleteKnowledge() DeleteKnowledgeOption
If set to true, the document is deleted even if agents use it, and it is removed from those agents.
type DeleteToolOption ¶ added in v0.0.3
type DeleteToolOption func(*deleteToolOption)
func WithForceDeleteTool ¶ added in v0.0.3
func WithForceDeleteTool() DeleteToolOption
If set to true, the tool is deleted even if agents use it, and it is removed from those agents and their branches.
type DependentAgent ¶ added in v0.0.3
type DependentAgent struct {
Type DependentAgentType `json:"type"`
ID string `json:"id"`
Name string `json:"name,omitempty"`
AccessLevel string `json:"access_level,omitempty"`
CreatedAtUnixSecs int64 `json:"created_at_unix_secs,omitempty"`
ReferencedResourceIDs []string `json:"referenced_resource_ids,omitempty"`
}
type DependentAgentList ¶ added in v0.0.3
type DependentAgentList struct {
Agents []DependentAgent `json:"agents"`
Branches []DependentBranch `json:"branches,omitempty"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor"`
}
type DependentAgentType ¶ added in v0.0.3
type DependentAgentType string
const ( DependentAgentAvailable DependentAgentType = "available" DependentAgentUnknown DependentAgentType = "unknown" )
func (DependentAgentType) String ¶ added in v0.0.3
func (t DependentAgentType) String() string
type DependentBranch ¶ added in v0.0.3
type DetectedEntity ¶ added in v0.0.3
type DuplicateAgentOption ¶ added in v0.0.3
type DuplicateAgentOption func(*duplicateAgentOption)
func WithDuplicateAgentName ¶ added in v0.0.3
func WithDuplicateAgentName(name string) DuplicateAgentOption
A name to make the duplicated agent easier to find.
type EditedTranscript ¶ added in v0.0.3
type EditedTranscript struct {
Kind string `json:"kind"`
ErrorType string `json:"error_type,omitempty"`
Message string `json:"message,omitempty"`
MessageType string `json:"message_type,omitempty"`
Text string `json:"text,omitempty"`
EditedText string `json:"edited_text,omitempty"`
}
func (EditedTranscript) OK ¶ added in v0.0.3
func (e EditedTranscript) OK() bool
type EmbeddingModel ¶ added in v0.0.3
type EmbeddingModel string
const ( EmbeddingModelE5Mistral7BInstruct EmbeddingModel = "e5_mistral_7b_instruct" EmbeddingModelMultilingualE5LargeInstruct EmbeddingModel = "multilingual_e5_large_instruct" )
func (EmbeddingModel) String ¶ added in v0.0.3
func (m EmbeddingModel) String() string
type EntityRedactionMode ¶ added in v0.0.3
type EntityRedactionMode string
const ( EntityRedactionRedacted EntityRedactionMode = "redacted" EntityRedactionEntityType EntityRedactionMode = "entity_type" EntityRedactionEnumeratedEntityType EntityRedactionMode = "enumerated_entity_type" )
func (EntityRedactionMode) String ¶ added in v0.0.3
func (m EntityRedactionMode) String() string
type ExportFormat ¶ added in v0.0.3
type ExportFormat string
const ( ExportFormatDocx ExportFormat = "docx" ExportFormatHTML ExportFormat = "html" ExportFormatPDF ExportFormat = "pdf" ExportFormatSegmentedJSON ExportFormat = "segmented_json" ExportFormatSRT ExportFormat = "srt" ExportFormatTXT ExportFormat = "txt" )
func (ExportFormat) String ¶ added in v0.0.3
func (f ExportFormat) String() string
type FileFormat ¶ added in v0.0.3
type FileFormat string
const ( FileFormatOther FileFormat = "other" FileFormatPCMS16LE16 FileFormat = "pcm_s16le_16" )
func (FileFormat) String ¶ added in v0.0.3
func (f FileFormat) String() string
type FilterFunc ¶
type FineTuning ¶
type FineTuning struct {
IsAllowedToFineTune bool `json:"is_allowed_to_fine_tune"`
State map[string]string `json:"state"`
VerificationFailures []string `json:"verification_failures"`
VerificationAttemptsCount int `json:"verification_attempts_count"`
ManualVerificationRequested bool `json:"manual_verification_requested"`
Language string `json:"language"`
Progress map[string]float64 `json:"progress"`
Message map[string]string `json:"message"`
DatasetDurationSeconds float64 `json:"dataset_duration_seconds"`
VerificationAttempts []VerificationAttempt `json:"verification_attempts"`
SliceIds []string `json:"slice_ids"`
ManualVerification *ManualVerification `json:"manual_verification"`
MaxVerificationAttempts int `json:"max_verification_attempts"`
NextMaxVerificationAttemptsResetUnixMs int `json:"next_max_verification_attempts_reset_unix_ms"`
}
type FineTuningState ¶
type FineTuningState string
const ( FineTuningStateDraft FineTuningState = "draft" FineTuningStateNotVerified FineTuningState = "not_verified" FineTuningStateNotStarted FineTuningState = "not_started" FineTuningStateQueued FineTuningState = "queued" FineTuningStateFineTuning FineTuningState = "fine_tuning" FineTuningStateFineTuned FineTuningState = "fine_tuned" FineTuningStateFailed FineTuningState = "failed" FineTuningStateDelayed FineTuningState = "delayed" )
func (FineTuningState) String ¶
func (s FineTuningState) String() string
type FlowsGenerationData ¶ added in v0.0.2
type GetAgentOption ¶ added in v0.0.3
type GetAgentOption func(*getAgentOption)
func WithAgentBranchID ¶ added in v0.0.3
func WithAgentBranchID(id string) GetAgentOption
The ID of the branch to use.
func WithAgentVersionID ¶ added in v0.0.3
func WithAgentVersionID(id string) GetAgentOption
The ID of the agent version to use.
func WithoutProcedureGeneratedWorkflow ¶ added in v0.0.3
func WithoutProcedureGeneratedWorkflow() GetAgentOption
When false, the workflow contains only authored elements, without nodes and edges generated from structured procedures.
type GetConversationSummaryOption ¶ added in v0.0.3
type GetConversationSummaryOption func(*getConversationSummaryOption)
func WithMaxMessages ¶ added in v0.0.3
func WithMaxMessages(n int) GetConversationSummaryOption
Maximum number of chat message turns to include inline. When the conversation has more than this, the messages are omitted and messages_omitted is set. Defaults to 40.
type GetKnowledgeChunkOption ¶ added in v0.0.3
type GetKnowledgeChunkOption func(*getKnowledgeChunkOption)
func WithKnowledgeEmbeddingModel ¶ added in v0.0.3
func WithKnowledgeEmbeddingModel(model EmbeddingModel) GetKnowledgeChunkOption
Embedding model used to look up the chunk.
type GetKnowledgeOption ¶ added in v0.0.3
type GetKnowledgeOption func(*getKnowledgeOption)
func WithKnowledgeAgentID ¶ added in v0.0.3
func WithKnowledgeAgentID(id string) GetKnowledgeOption
Scope the document lookup to this agent.
type GetToolOption ¶ added in v0.0.3
type GetToolOption func(*getToolOption)
func WithToolEnvironment ¶ added in v0.0.3
func WithToolEnvironment(environment string) GetToolOption
Environment whose values are used when the MCP server URL, headers, or auth connection reference environment variables. Defaults to production.
type KnowledgeChunk ¶ added in v0.0.3
type KnowledgeContent ¶ added in v0.0.3
type KnowledgeContent struct {
Content string `json:"content,omitempty"`
}
type KnowledgeDependentOption ¶ added in v0.0.3
type KnowledgeDependentOption func(*knowledgeDependentOption)
func WithKnowledgeDependentCursor ¶ added in v0.0.3
func WithKnowledgeDependentCursor(cursor string) KnowledgeDependentOption
Used for fetching the next page of dependent agents. Cursor is returned as NextCursor.
func WithKnowledgeDependentPageSize ¶ added in v0.0.3
func WithKnowledgeDependentPageSize(size int) KnowledgeDependentOption
How many dependent agents to return at maximum. Can not exceed 100, defaults to 30.
type KnowledgeDocument ¶ added in v0.0.3
type KnowledgeDocument struct {
Type KnowledgeType `json:"type"`
ID string `json:"id"`
Name string `json:"name"`
AccessInfo ResourceAccessInfo `json:"access_info"`
Metadata KnowledgeMetadata `json:"metadata"`
SupportedUsages []KnowledgeUsage `json:"supported_usages"`
URL string `json:"url,omitempty"`
Filename string `json:"filename,omitempty"`
ExtractedHTML string `json:"extracted_inner_html,omitempty"`
ContentFormat string `json:"content_format,omitempty"`
FolderParentID string `json:"folder_parent_id,omitempty"`
FolderPath []KnowledgeFolderPathSegment `json:"folder_path,omitempty"`
ChildrenCount int `json:"children_count,omitempty"`
DocumentCount int `json:"document_count,omitempty"`
AutoSyncInfo json.RawMessage `json:"auto_sync_info,omitempty"`
ExternalSyncInfo json.RawMessage `json:"external_sync_info,omitempty"`
}
type KnowledgeDocuments ¶ added in v0.0.3
type KnowledgeDocuments []KnowledgeDocument
func (KnowledgeDocuments) All ¶ added in v0.0.3
func (d KnowledgeDocuments) All() iter.Seq[KnowledgeDocument]
func (KnowledgeDocuments) AllWith ¶ added in v0.0.3
func (d KnowledgeDocuments) AllWith(filters ...KnowledgeFilterFunc) iter.Seq[KnowledgeDocument]
type KnowledgeFilterFunc ¶ added in v0.0.3
type KnowledgeFilterFunc func(*KnowledgeDocument) bool
type KnowledgeFolderPathSegment ¶ added in v0.0.3
type KnowledgeList ¶ added in v0.0.3
type KnowledgeList struct {
Documents KnowledgeDocuments `json:"documents"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor"`
}
type KnowledgeMetadata ¶ added in v0.0.3
type KnowledgeSort ¶ added in v0.0.3
type KnowledgeSort string
const ( KnowledgeSortName KnowledgeSort = "name" KnowledgeSortCreatedAt KnowledgeSort = "created_at" KnowledgeSortUpdatedAt KnowledgeSort = "updated_at" KnowledgeSortSize KnowledgeSort = "size" )
func (KnowledgeSort) String ¶ added in v0.0.3
func (s KnowledgeSort) String() string
type KnowledgeType ¶ added in v0.0.3
type KnowledgeType string
const ( KnowledgeTypeFile KnowledgeType = "file" KnowledgeTypeURL KnowledgeType = "url" KnowledgeTypeText KnowledgeType = "text" KnowledgeTypeFolder KnowledgeType = "folder" )
func (KnowledgeType) String ¶ added in v0.0.3
func (t KnowledgeType) String() string
type KnowledgeUsage ¶ added in v0.0.3
type KnowledgeUsage string
const ( KnowledgeUsagePrompt KnowledgeUsage = "prompt" KnowledgeUsageAuto KnowledgeUsage = "auto" )
func (KnowledgeUsage) String ¶ added in v0.0.3
func (u KnowledgeUsage) String() string
type LabellingStatus ¶
type LabellingStatus string
const ( LabellingStatusInReview LabellingStatus = "in_review" LabellingStatusReviewComplete LabellingStatus = "review_complete" )
func (LabellingStatus) String ¶
func (s LabellingStatus) String() string
type ListAgentsOption ¶ added in v0.0.3
type ListAgentsOption func(*listAgentsOption)
func WithAgentArchived ¶ added in v0.0.3
func WithAgentArchived() ListAgentsOption
Filter agents by archived status. Sends archived=true.
func WithAgentCursor ¶ added in v0.0.3
func WithAgentCursor(cursor string) ListAgentsOption
Used for fetching the next page. Cursor is returned in the list response as NextCursor.
func WithAgentPageSize ¶ added in v0.0.3
func WithAgentPageSize(size int) ListAgentsOption
How many Agents to return at maximum. Can not exceed 100, defaults to 30.
func WithAgentSearch ¶ added in v0.0.3
func WithAgentSearch(search string) ListAgentsOption
Search by agents name.
func WithAgentSort ¶ added in v0.0.3
func WithAgentSort(sort AgentSort) ListAgentsOption
The field to sort the results by. name, created_at, updated_at, or call_count_7d.
func WithAgentSortDirection ¶ added in v0.0.3
func WithAgentSortDirection(direction SortDirection) ListAgentsOption
The direction to sort the results. asc or desc.
func WithAgentTags ¶ added in v0.0.3
func WithAgentTags(tags ...string) ListAgentsOption
Filter agents by tag. Repeat the parameter to match any of several tags.
func WithCreatedByUserID ¶ added in v0.0.3
func WithCreatedByUserID(id string) ListAgentsOption
Filter agents by creator user ID. When set, only agents created by this user are returned. Use "@me" to refer to the authenticated user.
type ListConversationsOption ¶ added in v0.0.3
type ListConversationsOption func(*listConversationsOption)
func WithCallStartAfterUnix ¶ added in v0.0.3
func WithCallStartAfterUnix(ts int64) ListConversationsOption
Unix timestamp (in seconds) to filter conversations after this start date.
func WithCallStartBeforeUnix ¶ added in v0.0.3
func WithCallStartBeforeUnix(ts int64) ListConversationsOption
Unix timestamp (in seconds) to filter conversations up to this start date.
func WithCallSuccessful ¶ added in v0.0.3
func WithCallSuccessful(result CallSuccessful) ListConversationsOption
The result of the success evaluation: success, failure, unknown, or error.
func WithConversationAgentID ¶ added in v0.0.3
func WithConversationAgentID(id string) ListConversationsOption
Restrict results to conversations of this agent.
func WithConversationBranchID ¶ added in v0.0.3
func WithConversationBranchID(id string) ListConversationsOption
Filter conversations by branch ID.
func WithConversationCursor ¶ added in v0.0.3
func WithConversationCursor(cursor string) ListConversationsOption
Used for fetching the next page. Cursor is returned in the list response as NextCursor.
func WithConversationPageSize ¶ added in v0.0.3
func WithConversationPageSize(size int) ListConversationsOption
How many conversations to return at maximum. Can not exceed 100, defaults to 30.
func WithConversationSortDirection ¶ added in v0.0.3
func WithConversationSortDirection(direction SortDirection) ListConversationsOption
The direction to sort conversations by call start time. Defaults to descending (newest first).
func WithConversationUserID ¶ added in v0.0.3
func WithConversationUserID(id string) ListConversationsOption
Filter conversations by the user ID who initiated them.
func WithConversationVersionID ¶ added in v0.0.3
func WithConversationVersionID(id string) ListConversationsOption
Filter conversations by version ID.
func WithSummaryMode ¶ added in v0.0.3
func WithSummaryMode(mode ConversationSummaryMode) ListConversationsOption
Whether to include transcript summaries in the list response. exclude or include. Defaults to exclude.
type ListKnowledgeOption ¶ added in v0.0.3
type ListKnowledgeOption func(*listKnowledgeOption)
func WithKnowledgeAncestorFolderID ¶ added in v0.0.3
func WithKnowledgeAncestorFolderID(id string) ListKnowledgeOption
If set, the endpoint returns only documents that are descendants of the given folder.
func WithKnowledgeCreatedByUserID ¶ added in v0.0.3
func WithKnowledgeCreatedByUserID(id string) ListKnowledgeOption
Filter documents by creator user ID. When set, only documents created by this user are returned. Use "@me" to refer to the authenticated user.
func WithKnowledgeCursor ¶ added in v0.0.3
func WithKnowledgeCursor(cursor string) ListKnowledgeOption
Used for fetching the next page. Cursor is returned in the list response as NextCursor.
func WithKnowledgeFoldersFirst ¶ added in v0.0.3
func WithKnowledgeFoldersFirst() ListKnowledgeOption
Whether folders should be returned first in the list of documents. Sends folders_first=true.
func WithKnowledgePageSize ¶ added in v0.0.3
func WithKnowledgePageSize(size int) ListKnowledgeOption
How many documents to return at maximum. Can not exceed 100, defaults to 30.
func WithKnowledgeParentFolderID ¶ added in v0.0.3
func WithKnowledgeParentFolderID(id string) ListKnowledgeOption
If set, the endpoint returns only documents that are direct children of the given folder.
func WithKnowledgeSearch ¶ added in v0.0.3
func WithKnowledgeSearch(search string) ListKnowledgeOption
If specified, the endpoint returns only documents whose names start with this string.
func WithKnowledgeSort ¶ added in v0.0.3
func WithKnowledgeSort(sort KnowledgeSort) ListKnowledgeOption
The field to sort the results by. name, created_at, updated_at, or size.
func WithKnowledgeSortDirection ¶ added in v0.0.3
func WithKnowledgeSortDirection(direction SortDirection) ListKnowledgeOption
The direction to sort the results. asc or desc.
func WithKnowledgeTypes ¶ added in v0.0.3
func WithKnowledgeTypes(types ...KnowledgeType) ListKnowledgeOption
If present, the endpoint returns only documents of the given types. file, url, text, or folder.
type ListToolsOption ¶ added in v0.0.3
type ListToolsOption func(*listToolsOption)
func WithToolCreatedByUserID ¶ added in v0.0.3
func WithToolCreatedByUserID(id string) ListToolsOption
Filter tools by creator user ID. When set, only tools created by this user are returned. Use "@me" to refer to the authenticated user.
func WithToolCursor ¶ added in v0.0.3
func WithToolCursor(cursor string) ListToolsOption
Used for fetching the next page. Cursor is returned in the list response as NextCursor.
func WithToolPageSize ¶ added in v0.0.3
func WithToolPageSize(size int) ListToolsOption
How many tools to return at maximum. Can not exceed 100, defaults to 30.
func WithToolSearch ¶ added in v0.0.3
func WithToolSearch(search string) ListToolsOption
If specified, the endpoint returns only tools whose names start with this string.
func WithToolSort ¶ added in v0.0.3
func WithToolSort(sort ToolSort) ListToolsOption
The field to sort the results by. name or created_at.
func WithToolSortDirection ¶ added in v0.0.3
func WithToolSortDirection(direction SortDirection) ListToolsOption
The direction to sort the results. asc or desc.
func WithToolTypes ¶ added in v0.0.3
func WithToolTypes(types ...ToolType) ListToolsOption
If present, the endpoint returns only tools of the given types. webhook, client, or api_integration_webhook.
func WithToolUsedByAgentID ¶ added in v0.0.3
func WithToolUsedByAgentID(id string) ListToolsOption
Filter to tools referenced by this agent's main branch.
type ListWebhooksOption ¶ added in v0.0.2
type ListWebhooksOption func(*listWebhooksOption)
func WithIncludeUsages ¶ added in v0.0.2
func WithIncludeUsages(include bool) ListWebhooksOption
Whether to include active usages of the webhook. Only usable by workspace admins. Defaults to false.
type ManualVerification ¶
type ManualVerification struct {
ExtraText string `json:"extra_text"`
RequestTimeUnix int `json:"request_time_unix"`
Files []ManualVerificationFile `json:"files"`
}
type ManualVerificationFile ¶
type Model ¶
type Model struct {
ModelId string `json:"model_id"`
Name string `json:"name"`
CanBeFinetuned bool `json:"can_be_finetuned"`
CanDoTextToSpeech bool `json:"can_do_text_to_speech"`
CanDoVoiceConversion bool `json:"can_do_voice_conversion"`
CanUseStyle bool `json:"can_use_style"`
CanUseSpeakerBoost bool `json:"can_use_speaker_boost"`
ServesProVoices bool `json:"serves_pro_voices"`
TokenCostFactor float64 `json:"token_cost_factor"`
Description string `json:"description"`
RequiresAlphaAccess bool `json:"requires_alpha_access"`
MaximumTextLengthPerRequest int `json:"maximum_text_length_per_request"`
Languages []Language `json:"languages"`
ModelRates ModelRates `json:"model_rates"`
ConcurrencyGroup string `json:"concurrency_group"`
MaxCharactersRequestFreeUser int `json:"max_characters_request_free_user"`
MaxCharactersRequestSubscribedUser int `json:"max_characters_request_subscribed_user"`
}
type ModelRates ¶
type MultichannelOutputStyle ¶ added in v0.0.3
type MultichannelOutputStyle string
const ( MultichannelOutputSeparate MultichannelOutputStyle = "separate" MultichannelOutputCombined MultichannelOutputStyle = "combined" )
func (MultichannelOutputStyle) String ¶ added in v0.0.3
func (s MultichannelOutputStyle) String() string
type OutputFormat ¶
type OutputFormat byte
const ( ALAW8000 OutputFormat = iota MP3_22050_32 MP3_24000_48 MP3_44100_32 MP3_44100_64 MP3_44100_96 MP3_44100_128 MP3_44100_192 OPUS_48000_32 OPUS_48000_64 OPUS_48000_96 OPUS_48000_128 OPUS_48000_192 PCM_8000 PCM_16000 PCM_22050 PCM_24000 PCM_32000 PCM_44100 PCM_48000 ULAW8000 WAV_8000 WAV_16000 WAV_22050 WAV_24000 WAV_32000 WAV_44100 WAV_48000 )
func (OutputFormat) String ¶
func (o OutputFormat) String() string
type PostCallAudioData ¶ added in v0.0.2
type PostCallTranscriptionData ¶ added in v0.0.2
type PostCallTranscriptionData struct {
AgentID string `json:"agent_id"`
AgentName string `json:"agent_name"`
ConversationID string `json:"conversation_id"`
Status string `json:"status"`
UserID string `json:"user_id"`
BranchID string `json:"branch_id"`
VersionID string `json:"version_id"`
Environment string `json:"environment"`
Transcript []ConversationTurn `json:"transcript"`
Metadata ConversationMetadata `json:"metadata"`
Analysis ConversationAnalysis `json:"analysis"`
ConversationInitiationClientData json.RawMessage `json:"conversation_initiation_client_data"`
HasAudio bool `json:"has_audio"`
HasUserAudio bool `json:"has_user_audio"`
HasResponseAudio bool `json:"has_response_audio"`
}
type RAGDocumentIndexUsage ¶ added in v0.0.3
type RAGDocumentIndexUsage struct {
UsedBytes int64 `json:"used_bytes"`
}
type RAGIndex ¶ added in v0.0.3
type RAGIndex struct {
ID string `json:"id"`
Model EmbeddingModel `json:"model"`
Status RAGIndexStatus `json:"status"`
ProgressPercentage float64 `json:"progress_percentage"`
DocumentModelIndexUsage RAGDocumentIndexUsage `json:"document_model_index_usage"`
}
type RAGIndexStatus ¶ added in v0.0.3
type RAGIndexStatus string
const ( RAGIndexNew RAGIndexStatus = "new" RAGIndexCreated RAGIndexStatus = "created" RAGIndexProcessing RAGIndexStatus = "processing" RAGIndexFailed RAGIndexStatus = "failed" RAGIndexSucceeded RAGIndexStatus = "succeeded" RAGIndexLimitExceeded RAGIndexStatus = "rag_limit_exceeded" RAGIndexDocumentTooSmall RAGIndexStatus = "document_too_small" RAGIndexCannotIndexFolder RAGIndexStatus = "cannot_index_folder" )
func (RAGIndexStatus) String ¶ added in v0.0.3
func (s RAGIndexStatus) String() string
type ReaderResource ¶
type ReaderResource struct {
ResourceType ReaderResourceType `json:"resource_type"`
ResourceId string `json:"resource_id"`
}
type ReaderResourceType ¶
type ReaderResourceType string
const ( ReaderResourceRead ReaderResourceType = "read" ReaderResourceCollection ReaderResourceType = "collection" )
func (ReaderResourceType) String ¶
func (t ReaderResourceType) String() string
type RealtimeClientSecret ¶ added in v0.0.3
type RealtimeClientSecret struct {
Value string `json:"value"`
ExpiresAt int64 `json:"expires_at"`
Session json.RawMessage `json:"session,omitempty"`
}
type RecordingQuality ¶
type RecordingQuality string
const ( RecordingQualityStudio RecordingQuality = "studio" RecordingQualityGood RecordingQuality = "good" RecordingQualityOK RecordingQuality = "ok" RecordingQualityPoor RecordingQuality = "poor" RecordingQualityBad RecordingQuality = "bad" )
func (RecordingQuality) String ¶
func (q RecordingQuality) String() string
type ResourceAccessInfo ¶ added in v0.0.3
type ResourceAccessInfo struct {
IsCreator bool `json:"is_creator"`
CreatorName string `json:"creator_name"`
CreatorEmail string `json:"creator_email"`
Role AgentAccessRole `json:"role"`
AnonymousAccessLevelOverride AgentAccessRole `json:"anonymous_access_level_override,omitempty"`
AccessSource AgentAccessSource `json:"access_source,omitempty"`
}
type ReviewStatus ¶
type ReviewStatus string
const ( ReviewStatusNotRequested ReviewStatus = "not_requested" ReviewStatusPending ReviewStatus = "pending" ReviewStatusDeclined ReviewStatus = "declined" ReviewStatusDeclinedResubmittable ReviewStatus = "declined_resubmittable" ReviewStatusAllowed ReviewStatus = "allowed" ReviewStatusAllowedWithChanges ReviewStatus = "allowed_with_changes" )
func (ReviewStatus) String ¶
func (s ReviewStatus) String() string
type SafetyControl ¶
type SafetyControl string
const ( SafetyControlNone SafetyControl = "NONE" SafetyControlBan SafetyControl = "BAN" SafetyControlCaptcha SafetyControl = "CAPTCHA" SafetyControlEnterpriseBan SafetyControl = "ENTERPRISE_BAN" SafetyControlEnterpriseCaptcha SafetyControl = "ENTERPRISE_CAPTCHA" )
func (SafetyControl) String ¶
func (s SafetyControl) String() string
type Sample ¶
type Sample struct {
SampleId string `json:"sample_id"`
FileName string `json:"file_name"`
MimeType string `json:"mime_type"`
SizeBytes int `json:"size_bytes"`
Hash string `json:"hash"`
DurationSecs float64 `json:"duration_secs"`
RemoveBackgroundNoise bool `json:"remove_background_noise"`
HasIsolatedAudio bool `json:"has_isolated_audio"`
HasIsolatedAudioPreview bool `json:"has_isolated_audio_preview"`
SpeakerSeparation *SpeakerSeparation `json:"speaker_separation"`
TrimStart int `json:"trim_start"`
TrimEnd int `json:"trim_end"`
}
type SearchVoicesOption ¶
type SearchVoicesOption func(*searchVoicesOption)
func WithAccent ¶
func WithAccent(accent string) SearchVoicesOption
Accent used for filtering, based on the voice's 'accent' label.
func WithAge ¶
func WithAge(age string) SearchVoicesOption
Age used for filtering, based on the voice's 'age' label.
func WithCategory ¶
func WithCategory(category VoiceCategory) SearchVoicesOption
Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'.
func WithCollectionId ¶
func WithCollectionId(collectionId string) SearchVoicesOption
Collection ID to filter voices by.
func WithFineTuningState ¶
func WithFineTuningState(state FineTuningState) SearchVoicesOption
State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed'.
func WithGender ¶
func WithGender(gender string) SearchVoicesOption
Gender used for filtering, based on the voice's 'gender' label.
func WithHighQuality ¶
func WithHighQuality(highQuality bool) SearchVoicesOption
When true, only return studio-quality voices (those whose category is 'high_quality').
func WithIncludeCustomRates ¶
func WithIncludeCustomRates(include bool) SearchVoicesOption
Whether to include voices that have a custom sharing rate. Defaults to including them.
func WithIncludeLiveModerated ¶
func WithIncludeLiveModerated(include bool) SearchVoicesOption
Whether to include voices that have live moderation enabled. Defaults to including them.
func WithIncludeTotalCount ¶
func WithIncludeTotalCount(include bool) SearchVoicesOption
Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests. For pagination, rely on the has_more flag instead.
func WithLanguages ¶
func WithLanguages(languages ...string) SearchVoicesOption
Languages used for filtering, based on the voice's 'language' label. Voices matching any of the given languages are returned.
func WithMinNoticePeriodDays ¶
func WithMinNoticePeriodDays(days int) SearchVoicesOption
Filter to voices whose sharing notice period is at least the given number of days.
func WithNextPageToken ¶
func WithNextPageToken(token string) SearchVoicesOption
The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination.
func WithPageSize ¶
func WithPageSize(size int) SearchVoicesOption
How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included.
func WithSearch ¶
func WithSearch(search string) SearchVoicesOption
Search term to filter voices by. Searches in name, description, labels, category.
func WithSort ¶
func WithSort(sort VoiceSort) SearchVoicesOption
Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices.
func WithSortDirection ¶
func WithSortDirection(direction SortDirection) SearchVoicesOption
Which direction to sort the voices in. 'asc' or 'desc'.
func WithUseCases ¶
func WithUseCases(useCases ...string) SearchVoicesOption
Use cases used for filtering, based on the voice's 'use_case' label. Voices matching any of the given use cases are returned.
func WithVoiceIds ¶
func WithVoiceIds(voiceIds ...string) SearchVoicesOption
Voice IDs to lookup by. Maximum 100 voice IDs.
func WithVoiceType ¶
func WithVoiceType(voiceType VoiceType) SearchVoicesOption
Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'non-community', 'saved'.
type SessionAgentResponse ¶ added in v0.0.3
type SessionAgentToolResponse ¶ added in v0.0.3
type SessionAudio ¶ added in v0.0.3
type SessionAudio struct {
PCM []byte `json:"-"`
EventID int `json:"event_id"`
Alignment json.RawMessage `json:"alignment,omitempty"`
}
type SessionChatPart ¶ added in v0.0.3
type SessionChatPart struct {
Type SessionChatPartType `json:"type"`
Text string `json:"text,omitempty"`
EventID int `json:"event_id,omitempty"`
ResponseID string `json:"response_id,omitempty"`
}
type SessionChatPartType ¶ added in v0.0.3
type SessionChatPartType string
const ( SessionChatPartStart SessionChatPartType = "start" SessionChatPartDelta SessionChatPartType = "delta" SessionChatPartStop SessionChatPartType = "stop" )
func (SessionChatPartType) String ¶ added in v0.0.3
func (t SessionChatPartType) String() string
type SessionClientError ¶ added in v0.0.3
type SessionClientToolCall ¶ added in v0.0.3
type SessionClientToolCall struct {
ToolName string `json:"tool_name"`
ToolCallID string `json:"tool_call_id"`
Parameters json.RawMessage `json:"parameters,omitempty"`
}
type SessionContextUsage ¶ added in v0.0.3
type SessionCorrection ¶ added in v0.0.3
type SessionEvent ¶ added in v0.0.3
type SessionEvent struct {
Type SessionEventType
Raw json.RawMessage
Initiation *SessionInitiation
Ping *SessionPing
Audio *SessionAudio
Transcript *SessionTranscript
Response *SessionAgentResponse
Correction *SessionCorrection
ChatPart *SessionChatPart
Complete *SessionResponseComplete
Interruption *SessionInterruption
ClientTool *SessionClientToolCall
AgentTool *SessionAgentToolResponse
VAD *SessionVAD
Queue *SessionQueueStatus
Error *SessionClientError
ContextUsage *SessionContextUsage
Guardrail *SessionGuardrail
}
type SessionEventType ¶ added in v0.0.3
type SessionEventType string
const ( SessionEventInitiation SessionEventType = "conversation_initiation_metadata" SessionEventPing SessionEventType = "ping" SessionEventAudio SessionEventType = "audio" SessionEventUserTranscript SessionEventType = "user_transcript" SessionEventAgentResponse SessionEventType = "agent_response" SessionEventAgentResponseCorrection SessionEventType = "agent_response_correction" SessionEventAgentChatResponsePart SessionEventType = "agent_chat_response_part" SessionEventAgentResponseComplete SessionEventType = "agent_response_complete" SessionEventInterruption SessionEventType = "interruption" SessionEventClientToolCall SessionEventType = "client_tool_call" SessionEventAgentToolResponse SessionEventType = "agent_tool_response" SessionEventVADScore SessionEventType = "vad_score" SessionEventQueueStatus SessionEventType = "queue_status" SessionEventClientError SessionEventType = "client_error" SessionEventContextUsage SessionEventType = "context_usage" SessionEventGuardrailTriggered SessionEventType = "guardrail_triggered" SessionEventUnknown SessionEventType = "unknown" )
func (SessionEventType) String ¶ added in v0.0.3
func (t SessionEventType) String() string
type SessionGuardrail ¶ added in v0.0.3
type SessionGuardrail struct {
Name string `json:"guardrail_name"`
}
type SessionInitiation ¶ added in v0.0.3
type SessionInterruption ¶ added in v0.0.3
type SessionInterruption struct {
Reason string `json:"reason,omitempty"`
}
type SessionPing ¶ added in v0.0.3
type SessionQueueStatus ¶ added in v0.0.3
type SessionQueueStatus struct {
Status SessionQueueStatusValue `json:"status"`
}
type SessionQueueStatusValue ¶ added in v0.0.3
type SessionQueueStatusValue string
const ( SessionQueueWaiting SessionQueueStatusValue = "waiting" SessionQueueAdmitted SessionQueueStatusValue = "admitted" SessionQueueTimedOut SessionQueueStatusValue = "timed_out" )
func (SessionQueueStatusValue) String ¶ added in v0.0.3
func (s SessionQueueStatusValue) String() string
type SessionResponseComplete ¶ added in v0.0.3
type SessionResponseComplete struct {
EventID int `json:"event_id"`
}
type SessionTranscript ¶ added in v0.0.3
type SessionVAD ¶ added in v0.0.3
type SessionVAD struct {
Score float64 `json:"vad_score"`
}
type SignedURLOption ¶ added in v0.0.3
type SignedURLOption func(*signedURLOption)
func WithSignedURLBranchID ¶ added in v0.0.3
func WithSignedURLBranchID(id string) SignedURLOption
The ID of the branch to use.
func WithSignedURLConversationID ¶ added in v0.0.3
func WithSignedURLConversationID() SignedURLOption
Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again.
func WithSignedURLEnvironment ¶ added in v0.0.3
func WithSignedURLEnvironment(env string) SignedURLOption
The environment to use for resolving environment variables (e.g. production, staging). Defaults to production.
func WithSignedURLVersionID ¶ added in v0.0.3
func WithSignedURLVersionID(id string) SignedURLOption
The ID of the version to use.
type SoftTimeoutConfig ¶ added in v0.0.4
type SoftTimeoutConfig struct {
TimeoutSeconds *float64 `json:"timeout_seconds,omitempty"`
UseLLMGeneratedMessage *bool `json:"use_llm_generated_message,omitempty"`
LLMGeneratedMessagePromptOverride string `json:"llm_generated_message_prompt_override,omitempty"`
MaxSoftTimeoutsPerGeneration *int `json:"max_soft_timeouts_per_generation,omitempty"`
}
type SortDirection ¶
type SortDirection string
const ( SortAsc SortDirection = "asc" SortDesc SortDirection = "desc" )
func (SortDirection) String ¶
func (d SortDirection) String() string
type SpeakerSeparation ¶
type SpeakerSeparationStatus ¶
type SpeakerSeparationStatus string
const ( SpeakerSeparationNotStarted SpeakerSeparationStatus = "not_started" SpeakerSeparationPending SpeakerSeparationStatus = "pending" SpeakerSeparationCompleted SpeakerSeparationStatus = "completed" SpeakerSeparationFailed SpeakerSeparationStatus = "failed" )
func (SpeakerSeparationStatus) String ¶
func (s SpeakerSeparationStatus) String() string
type SpeechToSpeechOption ¶ added in v0.0.3
type SpeechToSpeechOption func(*speechToSpeechOption)
func WithAudioFilename ¶ added in v0.0.3
func WithAudioFilename(name string) SpeechToSpeechOption
Filename used in the multipart audio part. Defaults to the base name of an *os.File, or "audio".
func WithFileFormat ¶ added in v0.0.3
func WithFileFormat(format FileFormat) SpeechToSpeechOption
The format of input audio. Options are 'pcm_s16le_16' or 'other'. For pcm_s16le_16, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.
func WithRemoveBackgroundNoise ¶ added in v0.0.3
func WithRemoveBackgroundNoise() SpeechToSpeechOption
If set, will remove the background noise from your audio input using the audio isolation model. Only applies to Voice Changer.
func WithSpeechToSpeechModelId ¶ added in v0.0.3
func WithSpeechToSpeechModelId(modelId string) SpeechToSpeechOption
Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. Defaults to eleven_english_sts_v2.
func WithSpeechToSpeechOptimizeStreamingLatency ¶ added in v0.0.3
func WithSpeechToSpeechOptimizeStreamingLatency(latency StreamingLatency) SpeechToSpeechOption
You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: 0 - default mode (no latency optimizations) 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) 3 - max latency optimizations 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).
func WithSpeechToSpeechOutputFormat ¶ added in v0.0.3
func WithSpeechToSpeechOutputFormat(format OutputFormat) SpeechToSpeechOption
Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
func WithSpeechToSpeechSeed ¶ added in v0.0.3
func WithSpeechToSpeechSeed(seed int) SpeechToSpeechOption
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
func WithSpeechToSpeechVoiceSettings ¶ added in v0.0.3
func WithSpeechToSpeechVoiceSettings(voiceSettings VoiceSettings) SpeechToSpeechOption
Voice settings overriding stored settings for the given voice. They are applied only on the given request. Sent as a JSON encoded string in the multipart form.
func WithoutSpeechToSpeechEnableLogging ¶ added in v0.0.3
func WithoutSpeechToSpeechEnableLogging() SpeechToSpeechOption
When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
type SpeechToTextCharacter ¶ added in v0.0.3
type SpeechToTextFilterFunc ¶ added in v0.0.3
type SpeechToTextFilterFunc func(*SpeechToTextTranscript) bool
type SpeechToTextOption ¶ added in v0.0.3
type SpeechToTextOption func(*speechToTextOption)
func WithAdditionalFormats ¶ added in v0.0.3
func WithAdditionalFormats(formats ...TranscriptExportOptions) SpeechToTextOption
Additional formats to export the transcript to. Formats: docx, html, pdf, segmented_json, srt, txt.
func WithDetectSpeakerRoles ¶ added in v0.0.3
func WithDetectSpeakerRoles() SpeechToTextOption
Detect speaker roles (agent vs customer). Requires diarize=true. Cannot be used with use_multi_channel=true. When enabled, speaker_id values will be agent and customer instead of speaker_0, speaker_1, etc. Usage incurs an additional 10% surcharge.
func WithDiarizationThreshold ¶ added in v0.0.3
func WithDiarizationThreshold(threshold float64) SpeechToTextOption
Diarization threshold to apply during speaker diarization. A higher value means a lower chance of one speaker being diarized as two different speakers. Can only be set when diarize is true and num_speakers is unset. Defaults to a model-specific value (usually 0.22).
func WithDiarize ¶ added in v0.0.3
func WithDiarize() SpeechToTextOption
Annotate which speaker is currently talking in the uploaded file.
func WithEntityDetection ¶ added in v0.0.3
func WithEntityDetection(values ...string) SpeechToTextOption
Detect entities in the transcript. Can be all to detect all entities, a category (pii, phi, pci, other, offensive_language), or specific entity types. When enabled, detected entities are returned in the entities field.
func WithEntityRedaction ¶ added in v0.0.3
func WithEntityRedaction(values ...string) SpeechToTextOption
Redact entities from the transcript text. Accepts the same format as entity detection: all, a category (pii, phi), or specific entity types. Must be a subset of entity detection. When redaction is enabled, the entities field will not be returned.
func WithEntityRedactionMode ¶ added in v0.0.3
func WithEntityRedactionMode(mode EntityRedactionMode) SpeechToTextOption
How to format redacted entities. redacted replaces with {REDACTED}, entity_type replaces with {ENTITY_TYPE}, enumerated_entity_type replaces with {ENTITY_TYPE_N}. Only used when entity redaction is set.
func WithKeyterms ¶ added in v0.0.3
func WithKeyterms(terms ...string) SpeechToTextOption
Keyterms to bias the transcription towards. At most 1000 terms, each shorter than 50 characters and at most 5 words after normalisation. The characters < > { } [ ] \ are not supported. Usage incurs an additional 20% surcharge. When more than 100 keyterms are provided, a minimum billable duration of 20 seconds applies per request.
func WithMultichannelOutputStyle ¶ added in v0.0.3
func WithMultichannelOutputStyle(style MultichannelOutputStyle) SpeechToTextOption
Controls the response shape when use_multi_channel is enabled. separate (default) returns one transcript per channel under transcripts. combined merges all channels into a single transcript whose words are sorted by start time, each carrying a channel_index. combined requires timestamps and does not support entity detection or redaction.
func WithNoVerbatim ¶ added in v0.0.3
func WithNoVerbatim() SpeechToTextOption
If true, the transcription will not have any filler words, false starts and non-speech sounds. Only supported with scribe_v2.
func WithNumSpeakers ¶ added in v0.0.3
func WithNumSpeakers(n int) SpeechToTextOption
The maximum amount of speakers talking in the uploaded file. Can help with predicting who speaks when. The maximum amount of speakers that can be predicted is 32.
func WithSourceURL ¶ added in v0.0.3
func WithSourceURL(url string) SpeechToTextOption
The URL of an audio or video file to transcribe. Supports hosted video or audio files, YouTube video URLs, TikTok video URLs, and other video hosting services. Provide this instead of uploading a file.
func WithSpeechToTextAudioFilename ¶ added in v0.0.3
func WithSpeechToTextAudioFilename(name string) SpeechToTextOption
Filename used in the multipart file part. Defaults to the base name of an *os.File, or "audio".
func WithSpeechToTextFileFormat ¶ added in v0.0.3
func WithSpeechToTextFileFormat(format FileFormat) SpeechToTextOption
The format of input audio. Options are pcm_s16le_16 or other. For pcm_s16le_16, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.
func WithSpeechToTextLanguageCode ¶ added in v0.0.3
func WithSpeechToTextLanguageCode(languageCode string) SpeechToTextOption
An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically.
func WithSpeechToTextModelId ¶ added in v0.0.3
func WithSpeechToTextModelId(modelId string) SpeechToTextOption
The ID of the model to use for transcription. Defaults to scribe_v2. Use scribe_v2_medical for medical and clinical audio.
func WithSpeechToTextSeed ¶ added in v0.0.3
func WithSpeechToTextSeed(seed int) SpeechToTextOption
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647.
func WithSpeechToTextTemperature ¶ added in v0.0.3
func WithSpeechToTextTemperature(temperature float64) SpeechToTextOption
Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, a temperature based on the selected model is used, usually 0.
func WithSpeechToTextToken ¶ added in v0.0.3
func WithSpeechToTextToken(token string) SpeechToTextOption
A single-use authentication token created via POST /v1/single-use-token/batch_scribe. This token can only be used once and expires after 15 minutes. Alternative to API key authentication for frontend clients.
func WithSpeechToTextWebhook ¶ added in v0.0.3
func WithSpeechToTextWebhook() SpeechToTextOption
Process the request asynchronously and send the transcription result to configured speech-to-text webhooks. The request returns early without the transcription.
func WithSpeechToTextWebhookID ¶ added in v0.0.3
func WithSpeechToTextWebhookID(webhookID string) SpeechToTextOption
Optional specific webhook ID to send the transcription result to. Only valid when webhook is set to true. If not provided, transcription will be sent to all configured speech-to-text webhooks.
func WithSpeechToTextWebhookMetadata ¶ added in v0.0.3
func WithSpeechToTextWebhookMetadata(metadata any) SpeechToTextOption
Optional metadata included in the webhook response. Must JSON-encode to an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information.
func WithTagAudioEvents ¶ added in v0.0.3
func WithTagAudioEvents() SpeechToTextOption
Tag audio events like (laughter), (footsteps), etc. in the transcription.
func WithTimestampsGranularity ¶ added in v0.0.3
func WithTimestampsGranularity(granularity TimestampsGranularity) SpeechToTextOption
The granularity of the timestamps in the transcription. word provides word-level timestamps and character provides character-level timestamps per word.
func WithTranscriptEdit ¶ added in v0.0.3
func WithTranscriptEdit(instruction string) SpeechToTextOption
Natural-language instruction applied to the final transcript (max 2000 characters). The edited text is returned in edited_transcript alongside the original transcript. Cannot be combined with entity detection, entity redaction, or use_multi_channel. Usage incurs an additional 30% surcharge, billed for at least 10 seconds of audio.
func WithUseMultiChannel ¶ added in v0.0.3
func WithUseMultiChannel() SpeechToTextOption
Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel is transcribed independently. A maximum of 5 channels is supported. Each channel is billed independently at the full audio duration.
func WithUseSpeakerLibrary ¶ added in v0.0.3
func WithUseSpeakerLibrary() SpeechToTextOption
Use the speaker library for identifying known speakers during diarization. When enabled and diarize is true, detected speakers will be matched against registered speakers in the workspace's speaker library.
func WithoutSpeechToTextEnableLogging ¶ added in v0.0.3
func WithoutSpeechToTextEnableLogging() SpeechToTextOption
When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers.
func WithoutTagAudioEvents ¶ added in v0.0.3
func WithoutTagAudioEvents() SpeechToTextOption
Disable tagging of audio events in the transcription.
type SpeechToTextResult ¶ added in v0.0.3
type SpeechToTextResult struct {
SpeechToTextTranscript
Transcripts SpeechToTextTranscripts `json:"transcripts,omitempty"`
Message string `json:"message,omitempty"`
RequestID string `json:"request_id,omitempty"`
}
func (SpeechToTextResult) All ¶ added in v0.0.3
func (r SpeechToTextResult) All() iter.Seq[SpeechToTextTranscript]
func (SpeechToTextResult) AllWith ¶ added in v0.0.3
func (r SpeechToTextResult) AllWith(filters ...SpeechToTextFilterFunc) iter.Seq[SpeechToTextTranscript]
func (SpeechToTextResult) IsMultichannel ¶ added in v0.0.3
func (r SpeechToTextResult) IsMultichannel() bool
func (SpeechToTextResult) IsWebhook ¶ added in v0.0.3
func (r SpeechToTextResult) IsWebhook() bool
type SpeechToTextTranscript ¶ added in v0.0.3
type SpeechToTextTranscript struct {
LanguageCode string `json:"language_code,omitempty"`
LanguageProbability float64 `json:"language_probability,omitempty"`
Text string `json:"text,omitempty"`
Words []SpeechToTextWord `json:"words,omitempty"`
ChannelIndex *int `json:"channel_index,omitempty"`
AdditionalFormats []AdditionalFormat `json:"additional_formats,omitempty"`
TranscriptionID string `json:"transcription_id,omitempty"`
Entities []DetectedEntity `json:"entities,omitempty"`
AudioDurationSecs *float64 `json:"audio_duration_secs,omitempty"`
EditedTranscript *EditedTranscript `json:"edited_transcript,omitempty"`
}
type SpeechToTextTranscriptionData ¶ added in v0.0.2
type SpeechToTextTranscriptionData struct {
RequestID string `json:"request_id"`
WebhookMetadata json.RawMessage `json:"webhook_metadata"`
Transcription json.RawMessage `json:"transcription"`
}
func (SpeechToTextTranscriptionData) Result ¶ added in v0.0.3
func (d SpeechToTextTranscriptionData) Result() (SpeechToTextResult, error)
type SpeechToTextTranscripts ¶ added in v0.0.3
type SpeechToTextTranscripts []SpeechToTextTranscript
func (SpeechToTextTranscripts) All ¶ added in v0.0.3
func (t SpeechToTextTranscripts) All() iter.Seq[SpeechToTextTranscript]
func (SpeechToTextTranscripts) AllWith ¶ added in v0.0.3
func (t SpeechToTextTranscripts) AllWith(filters ...SpeechToTextFilterFunc) iter.Seq[SpeechToTextTranscript]
type SpeechToTextWord ¶ added in v0.0.3
type SpeechToTextWord struct {
Text string `json:"text"`
Start *float64 `json:"start"`
End *float64 `json:"end"`
Type SpeechToTextWordType `json:"type"`
SpeakerID string `json:"speaker_id,omitempty"`
Logprob float64 `json:"logprob"`
Characters []SpeechToTextCharacter `json:"characters,omitempty"`
ChannelIndex *int `json:"channel_index,omitempty"`
}
type SpeechToTextWordType ¶ added in v0.0.3
type SpeechToTextWordType string
const ( SpeechToTextWordTypeWord SpeechToTextWordType = "word" SpeechToTextWordTypeSpacing SpeechToTextWordType = "spacing" SpeechToTextWordTypeAudioEvent SpeechToTextWordType = "audio_event" )
func (SpeechToTextWordType) String ¶ added in v0.0.3
func (t SpeechToTextWordType) String() string
type StartConversationOption ¶ added in v0.0.3
type StartConversationOption func(*startConversationOption)
func WithSessionBranchID ¶ added in v0.0.3
func WithSessionBranchID(id string) StartConversationOption
The ID of the branch to use.
func WithSessionConfigOverride ¶ added in v0.0.3
func WithSessionConfigOverride(config json.RawMessage) StartConversationOption
Override conversation config for this session as pass-through JSON.
func WithSessionDynamicVariables ¶ added in v0.0.3
func WithSessionDynamicVariables(vars json.RawMessage) StartConversationOption
Dynamic variables for this session as pass-through JSON.
func WithSessionEventBuffer ¶ added in v0.0.3
func WithSessionEventBuffer(n int) StartConversationOption
Size of the Events channel buffer. Defaults to 32. Values <= 0 use the default.
func WithSessionExtraBody ¶ added in v0.0.3
func WithSessionExtraBody(body json.RawMessage) StartConversationOption
Extra body for a custom LLM as pass-through JSON (custom_llm_extra_body).
func WithSessionSignedURL ¶ added in v0.0.3
func WithSessionSignedURL() StartConversationOption
Fetch a signed URL with GetSignedURL, then dial it. Skips xi-api-key. WithSessionURL wins if both are set.
func WithSessionURL ¶ added in v0.0.3
func WithSessionURL(rawURL string) StartConversationOption
Dial this signed WebSocket URL instead of building one from agent_id. Skips xi-api-key.
func WithSessionUserID ¶ added in v0.0.3
func WithSessionUserID(id string) StartConversationOption
Custom user identifier sent in conversation_initiation_client_data.
func WithSessionVersionID ¶ added in v0.0.3
func WithSessionVersionID(id string) StartConversationOption
The ID of the version to use.
type StreamingLatency ¶
type StreamingLatency byte
const ( StreamingLatencyDefault StreamingLatency = iota StreamingLatencyNormal StreamingLatencyStrong StreamingLatencyMax StreamingLatencyMaxNoNormalizer )
func (StreamingLatency) String ¶
func (l StreamingLatency) String() string
type TextNormalization ¶
type TextNormalization string
const ( TextNormalizationAuto TextNormalization = "auto" TextNormalizationOn TextNormalization = "on" TextNormalizationOff TextNormalization = "off" )
func (TextNormalization) String ¶
func (t TextNormalization) String() string
type TextToSpeechOption ¶
type TextToSpeechOption func(*textToSpeechOption)
func WithApplyLanguageTextNormalization ¶
func WithApplyLanguageTextNormalization() TextToSpeechOption
This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.
func WithApplyTextNormalization ¶
func WithApplyTextNormalization(mode TextNormalization) TextToSpeechOption
This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.
func WithAudioEffects ¶
func WithAudioEffects(effects AudioEffects) TextToSpeechOption
Audio effects applied to the generated audio. Unknown IDs return 404 with param naming the field. Reverb (environment_id with send_level above 0) and a non-zero pan produce stereo audio and are rejected with 400 for ulaw_*, alaw_*, and pcm_* output formats. Effects don't change the cost of the request.
func WithLanguageCode ¶
func WithLanguageCode(languageCode string) TextToSpeechOption
Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models.
func WithModelId ¶
func WithModelId(modelId string) TextToSpeechOption
Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. Defaults to eleven_multilingual_v2.
func WithNextRequestIds ¶
func WithNextRequestIds(ids ...string) TextToSpeechOption
A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.
func WithNextText ¶
func WithNextText(text string) TextToSpeechOption
The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.
func WithOptimizeStreamingLatency ¶
func WithOptimizeStreamingLatency(latency StreamingLatency) TextToSpeechOption
You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: 0 - default mode (no latency optimizations) 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) 3 - max latency optimizations 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).
func WithOutputFormat ¶
func WithOutputFormat(format OutputFormat) TextToSpeechOption
Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
func WithPreviousRequestIds ¶
func WithPreviousRequestIds(ids ...string) TextToSpeechOption
A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.
func WithPreviousText ¶
func WithPreviousText(text string) TextToSpeechOption
The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.
func WithPronunciationDictionaryLocators ¶
func WithPronunciationDictionaryLocators(locators ...PronunciationDictionaryLocator) TextToSpeechOption
A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request.
func WithSeed ¶
func WithSeed(seed int) TextToSpeechOption
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
func WithUsePvcAsIvc ¶
func WithUsePvcAsIvc(use bool) TextToSpeechOption
Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency.
func WithVoiceSettings ¶
func WithVoiceSettings(voiceSettings VoiceSettings) TextToSpeechOption
Voice settings overriding stored settings for the given voice. They are applied only on the given request.
func WithoutEnableLogging ¶
func WithoutEnableLogging() TextToSpeechOption
When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
type TimestampsGranularity ¶ added in v0.0.3
type TimestampsGranularity string
const ( TimestampsGranularityNone TimestampsGranularity = "none" TimestampsGranularityWord TimestampsGranularity = "word" TimestampsGranularityCharacter TimestampsGranularity = "character" )
func (TimestampsGranularity) String ¶ added in v0.0.3
func (g TimestampsGranularity) String() string
type Tool ¶ added in v0.0.3
type Tool struct {
ID string `json:"id"`
ToolConfig ToolConfig `json:"tool_config"`
AccessInfo ResourceAccessInfo `json:"access_info"`
UsageStats ToolUsageStats `json:"usage_stats"`
ResponseMocks json.RawMessage `json:"response_mocks,omitempty"`
}
type ToolCallSound ¶ added in v0.0.3
type ToolCallSound string
const ( ToolCallSoundTyping ToolCallSound = "typing" ToolCallSoundElevator1 ToolCallSound = "elevator1" ToolCallSoundElevator2 ToolCallSound = "elevator2" ToolCallSoundElevator3 ToolCallSound = "elevator3" ToolCallSoundElevator4 ToolCallSound = "elevator4" )
func (ToolCallSound) String ¶ added in v0.0.3
func (s ToolCallSound) String() string
type ToolCallSoundBehavior ¶ added in v0.0.3
type ToolCallSoundBehavior string
const ( ToolCallSoundAuto ToolCallSoundBehavior = "auto" ToolCallSoundAlways ToolCallSoundBehavior = "always" )
func (ToolCallSoundBehavior) String ¶ added in v0.0.3
func (b ToolCallSoundBehavior) String() string
type ToolConfig ¶ added in v0.0.3
type ToolConfig struct {
Type ToolType `json:"type"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APISchema *WebhookAPISchema `json:"api_schema,omitempty"`
FollowRedirects *bool `json:"follow_redirects,omitempty"`
FollowRedirectsAllowedDomains []string `json:"follow_redirects_allowed_domains,omitempty"`
ExpectsResponse *bool `json:"expects_response,omitempty"`
Parameters json.RawMessage `json:"parameters,omitempty"`
Params json.RawMessage `json:"params,omitempty"`
Value json.RawMessage `json:"value,omitempty"`
ResponseTimeoutSecs *int `json:"response_timeout_secs,omitempty"`
ExecutionMode ToolExecutionMode `json:"execution_mode,omitempty"`
InterruptionMode ToolInterruptionMode `json:"interruption_mode,omitempty"`
PreToolSpeech ToolPreSpeech `json:"pre_tool_speech,omitempty"`
ToolCallSound ToolCallSound `json:"tool_call_sound,omitempty"`
ToolCallSoundBehavior ToolCallSoundBehavior `json:"tool_call_sound_behavior,omitempty"`
ToolErrorHandlingMode ToolErrorHandlingMode `json:"tool_error_handling_mode,omitempty"`
Assignments json.RawMessage `json:"assignments,omitempty"`
DynamicVariables json.RawMessage `json:"dynamic_variables,omitempty"`
}
type ToolDependentOption ¶ added in v0.0.3
type ToolDependentOption func(*toolDependentOption)
func WithToolDependentCursor ¶ added in v0.0.3
func WithToolDependentCursor(cursor string) ToolDependentOption
Used for fetching the next page of dependent agents. Cursor is returned as NextCursor.
func WithToolDependentPageSize ¶ added in v0.0.3
func WithToolDependentPageSize(size int) ToolDependentOption
How many dependent agents to return at maximum. Can not exceed 100, defaults to 30.
type ToolErrorHandlingMode ¶ added in v0.0.3
type ToolErrorHandlingMode string
const ( ToolErrorHandlingAuto ToolErrorHandlingMode = "auto" ToolErrorHandlingSummarized ToolErrorHandlingMode = "summarized" ToolErrorHandlingPassthrough ToolErrorHandlingMode = "passthrough" ToolErrorHandlingHide ToolErrorHandlingMode = "hide" )
func (ToolErrorHandlingMode) String ¶ added in v0.0.3
func (m ToolErrorHandlingMode) String() string
type ToolExecutionMode ¶ added in v0.0.3
type ToolExecutionMode string
const ( ToolExecutionImmediate ToolExecutionMode = "immediate" ToolExecutionPostToolSpeech ToolExecutionMode = "post_tool_speech" ToolExecutionAsync ToolExecutionMode = "async" )
func (ToolExecutionMode) String ¶ added in v0.0.3
func (m ToolExecutionMode) String() string
type ToolFilterFunc ¶ added in v0.0.3
type ToolInterruptionMode ¶ added in v0.0.3
type ToolInterruptionMode string
const ( ToolInterruptionAllow ToolInterruptionMode = "allow" ToolInterruptionDisableDuringTool ToolInterruptionMode = "disable_during_tool" ToolInterruptionDisableDuringToolAndTurn ToolInterruptionMode = "disable_during_tool_and_turn" )
func (ToolInterruptionMode) String ¶ added in v0.0.3
func (m ToolInterruptionMode) String() string
type ToolPreSpeech ¶ added in v0.0.3
type ToolPreSpeech string
const ( ToolPreSpeechAuto ToolPreSpeech = "auto" ToolPreSpeechForce ToolPreSpeech = "force" ToolPreSpeechOff ToolPreSpeech = "off" )
func (ToolPreSpeech) String ¶ added in v0.0.3
func (s ToolPreSpeech) String() string
type ToolUsageStats ¶ added in v0.0.3
type TranscriptExportOptions ¶ added in v0.0.3
type TranscriptExportOptions struct {
Format ExportFormat `json:"format"`
IncludeSpeakers *bool `json:"include_speakers,omitempty"`
IncludeTimestamps *bool `json:"include_timestamps,omitempty"`
SegmentOnSilenceLongerThanS *float64 `json:"segment_on_silence_longer_than_s,omitempty"`
MaxSegmentDurationS *float64 `json:"max_segment_duration_s,omitempty"`
MaxSegmentChars *int `json:"max_segment_chars,omitempty"`
MaxCharactersPerLine *int `json:"max_characters_per_line,omitempty"`
}
type TurnConfig ¶ added in v0.0.3
type TurnConfig struct {
TurnTimeout *float64 `json:"turn_timeout,omitempty"`
SilenceEndCallTimeout *float64 `json:"silence_end_call_timeout,omitempty"`
TurnEagerness string `json:"turn_eagerness,omitempty"`
SpeculativeTurn *bool `json:"speculative_turn,omitempty"`
SoftTimeoutConfig *SoftTimeoutConfig `json:"soft_timeout_config,omitempty"`
}
type UpdateAgentOption ¶ added in v0.0.3
type UpdateAgentOption func(*updateAgentOption)
func WithUpdateAgentBranchID ¶ added in v0.0.3
func WithUpdateAgentBranchID(id string) UpdateAgentOption
The ID of the branch to use.
func WithUpdateAgentName ¶ added in v0.0.3
func WithUpdateAgentName(name string) UpdateAgentOption
A name to make the agent easier to find.
func WithUpdateAgentTags ¶ added in v0.0.3
func WithUpdateAgentTags(tags ...string) UpdateAgentOption
Replace agent tags.
func WithUpdateAgentWorkflow ¶ added in v0.0.3
func WithUpdateAgentWorkflow(workflow json.RawMessage) UpdateAgentOption
Workflow for the agent. Pass through JSON.
func WithUpdateConversationConfig ¶ added in v0.0.3
func WithUpdateConversationConfig(config ConversationalConfig) UpdateAgentOption
Conversation configuration for an agent.
func WithUpdatePlatformSettings ¶ added in v0.0.3
func WithUpdatePlatformSettings(settings json.RawMessage) UpdateAgentOption
Platform settings for the agent. Pass through JSON.
func WithVersionDescription ¶ added in v0.0.3
func WithVersionDescription(description string) UpdateAgentOption
Description for this version when publishing changes.
func WithoutUpdateProcedureGeneratedWorkflow ¶ added in v0.0.3
func WithoutUpdateProcedureGeneratedWorkflow() UpdateAgentOption
When false, the workflow contains only authored elements, without nodes and edges generated from structured procedures.
type UpdateKnowledgeOption ¶ added in v0.0.3
type UpdateKnowledgeOption func(*updateKnowledgeOption)
func WithUpdateKnowledgeContent ¶ added in v0.0.3
func WithUpdateKnowledgeContent(content string) UpdateKnowledgeOption
Updated content for the document. Supported for text documents, URL documents with auto-sync disabled, and file documents that are not synced from an external source.
func WithUpdateKnowledgeName ¶ added in v0.0.3
func WithUpdateKnowledgeName(name string) UpdateKnowledgeOption
A custom, human-readable name for the document.
type UpdateToolOption ¶ added in v0.0.3
type UpdateToolOption = CreateToolOption
type UpdateWebhookOption ¶ added in v0.0.2
type UpdateWebhookOption func(*updateWebhookOption)
func WithUpdateWebhookRequestHeaders ¶ added in v0.0.2
func WithUpdateWebhookRequestHeaders(headers map[string]string) UpdateWebhookOption
A list of request headers to include with the webhook delivery. Headers are write-only and are not returned by ListWebhooks.
func WithWebhookEvents ¶ added in v0.0.2
func WithWebhookEvents(events ...WebhookSubscriptionEvent) UpdateWebhookOption
The complete set of workspace-level events this webhook should be subscribed to. The webhook is added to the events in the list and removed from any not in the list. Omit to leave the current event subscriptions unchanged.
func WithWebhookRetryEnabled ¶ added in v0.0.2
func WithWebhookRetryEnabled(enabled bool) UpdateWebhookOption
Whether to enable automatic retries for transient failures (5xx, 429, timeout). Retries are disabled by default.
type VerificationAttempt ¶
type VerifiedLanguage ¶
type Voice ¶
type Voice struct {
VoiceId string `json:"voice_id"`
Name string `json:"name"`
Samples []Sample `json:"samples"`
Category VoiceCategory `json:"category"`
FineTuning *FineTuning `json:"fine_tuning"`
Labels map[string]string `json:"labels"`
Description string `json:"description"`
PreviewUrl string `json:"preview_url"`
AvailableForTiers []string `json:"available_for_tiers"`
Settings *VoiceSettings `json:"settings"`
Sharing *VoiceSharing `json:"sharing"`
HighQualityBaseModelIds []string `json:"high_quality_base_model_ids"`
VerifiedLanguages []VerifiedLanguage `json:"verified_languages"`
CollectionIds []string `json:"collection_ids"`
SafetyControl SafetyControl `json:"safety_control"`
VoiceVerification *VoiceVerification `json:"voice_verification"`
PermissionOnResource string `json:"permission_on_resource"`
IsOwner bool `json:"is_owner"`
IsLegacy bool `json:"is_legacy"`
IsMixed bool `json:"is_mixed"`
FavoritedAtUnix int `json:"favorited_at_unix"`
CreatedAtUnix int `json:"created_at_unix"`
IsBookmarked bool `json:"is_bookmarked"`
RecordingQuality RecordingQuality `json:"recording_quality"`
LabellingStatus LabellingStatus `json:"labelling_status"`
RecordingQualityReason string `json:"recording_quality_reason"`
}
type VoiceCategory ¶
type VoiceCategory string
const ( VoiceCategoryGenerated VoiceCategory = "generated" VoiceCategoryCloned VoiceCategory = "cloned" VoiceCategoryPremade VoiceCategory = "premade" VoiceCategoryProfessional VoiceCategory = "professional" VoiceCategoryFamous VoiceCategory = "famous" VoiceCategoryHighQuality VoiceCategory = "high_quality" )
func (VoiceCategory) String ¶
func (c VoiceCategory) String() string
type VoiceFilterFunc ¶
type VoiceSearchResult ¶
type VoiceSettings ¶
type VoiceSharing ¶
type VoiceSharing struct {
Status VoiceSharingStatus `json:"status"`
HistoryItemSampleId string `json:"history_item_sample_id"`
DateUnix int `json:"date_unix"`
WhitelistedEmails []string `json:"whitelisted_emails"`
PublicOwnerId string `json:"public_owner_id"`
OriginalVoiceId string `json:"original_voice_id"`
FinancialRewardsEnabled bool `json:"financial_rewards_enabled"`
FreeUsersAllowed bool `json:"free_users_allowed"`
LiveModerationEnabled bool `json:"live_moderation_enabled"`
Rate float64 `json:"rate"`
FiatRate float64 `json:"fiat_rate"`
NoticePeriod int `json:"notice_period"`
DisableAtUnix int `json:"disable_at_unix"`
VoiceMixingAllowed bool `json:"voice_mixing_allowed"`
Featured bool `json:"featured"`
Category VoiceCategory `json:"category"`
ReaderAppEnabled bool `json:"reader_app_enabled"`
ImageUrl string `json:"image_url"`
BanReason string `json:"ban_reason"`
LikedByCount int `json:"liked_by_count"`
ClonedByCount int `json:"cloned_by_count"`
Name string `json:"name"`
Description string `json:"description"`
Labels map[string]string `json:"labels"`
ReviewStatus ReviewStatus `json:"review_status"`
ReviewMessage string `json:"review_message"`
EnabledInLibrary bool `json:"enabled_in_library"`
InstagramUsername string `json:"instagram_username"`
TwitterUsername string `json:"twitter_username"`
YoutubeUsername string `json:"youtube_username"`
TiktokUsername string `json:"tiktok_username"`
ModerationCheck *VoiceSharingModerationCheck `json:"moderation_check"`
ReaderRestrictedOn []ReaderResource `json:"reader_restricted_on"`
}
type VoiceSharingModerationCheck ¶
type VoiceSharingModerationCheck struct {
DateCheckedUnix int `json:"date_checked_unix"`
NameValue string `json:"name_value"`
NameCheck bool `json:"name_check"`
DescriptionValue string `json:"description_value"`
DescriptionCheck bool `json:"description_check"`
SampleIds []string `json:"sample_ids"`
SampleChecks []float64 `json:"sample_checks"`
CaptchaIds []string `json:"captcha_ids"`
CaptchaChecks []float64 `json:"captcha_checks"`
}
type VoiceSharingStatus ¶
type VoiceSharingStatus string
const ( VoiceSharingEnabled VoiceSharingStatus = "enabled" VoiceSharingDisabled VoiceSharingStatus = "disabled" VoiceSharingCopied VoiceSharingStatus = "copied" VoiceSharingCopiedDisabled VoiceSharingStatus = "copied_disabled" )
func (VoiceSharingStatus) String ¶
func (s VoiceSharingStatus) String() string
type VoiceType ¶
type VoiceType string
const ( VoiceTypePersonal VoiceType = "personal" VoiceTypeCommunity VoiceType = "community" VoiceTypeDefault VoiceType = "default" VoiceTypeWorkspace VoiceType = "workspace" VoiceTypeNonDefault VoiceType = "non-default" VoiceTypeNonCommunity VoiceType = "non-community" VoiceTypeSaved VoiceType = "saved" )
type VoiceVerification ¶
type VoiceVerification struct {
RequiresVerification bool `json:"requires_verification"`
IsVerified bool `json:"is_verified"`
VerificationFailures []string `json:"verification_failures"`
VerificationAttemptsCount int `json:"verification_attempts_count"`
Language string `json:"language"`
VerificationAttempts []VerificationAttempt `json:"verification_attempts"`
}
type Webhook ¶ added in v0.0.2
type Webhook struct {
Name string `json:"name"`
WebhookID string `json:"webhook_id"`
WebhookURL string `json:"webhook_url"`
IsDisabled bool `json:"is_disabled"`
IsAutoDisabled bool `json:"is_auto_disabled"`
CreatedAtUnix int64 `json:"created_at_unix"`
AuthType WebhookAuthType `json:"auth_type"`
Usage []WebhookUsage `json:"usage"`
Events []WebhookSubscriptionEvent `json:"events"`
MostRecentFailureErrorCode *int `json:"most_recent_failure_error_code"`
MostRecentFailureTimestamp *int64 `json:"most_recent_failure_timestamp"`
}
type WebhookAPISchema ¶ added in v0.0.3
type WebhookAPISchema struct {
URL string `json:"url"`
Method string `json:"method,omitempty"`
PathParamsSchema json.RawMessage `json:"path_params_schema,omitempty"`
QueryParamsSchema json.RawMessage `json:"query_params_schema,omitempty"`
RequestBodySchema json.RawMessage `json:"request_body_schema,omitempty"`
RequestHeaders json.RawMessage `json:"request_headers,omitempty"`
AuthConnection json.RawMessage `json:"auth_connection,omitempty"`
}
type WebhookAuthType ¶ added in v0.0.2
type WebhookAuthType string
const ( WebhookAuthHMAC WebhookAuthType = "hmac" WebhookAuthOAuth2 WebhookAuthType = "oauth2" WebhookAuthMTLS WebhookAuthType = "mtls" )
func (WebhookAuthType) String ¶ added in v0.0.2
func (t WebhookAuthType) String() string
type WebhookEvent ¶ added in v0.0.2
type WebhookEvent struct {
Type WebhookEventType `json:"type"`
EventTimestamp int64 `json:"event_timestamp"`
Data json.RawMessage `json:"data"`
}
func ConstructWebhookEvent ¶ added in v0.0.2
func ConstructWebhookEvent(payload []byte, sigHeader, secret string) (WebhookEvent, error)
ConstructWebhookEvent verifies the ElevenLabs-Signature header, rejects timestamps older than 30 minutes, and unmarshals the raw JSON payload. payload must be the exact request body bytes.
func (WebhookEvent) UnmarshalData ¶ added in v0.0.2
func (e WebhookEvent) UnmarshalData(v any) error
type WebhookEventType ¶ added in v0.0.2
type WebhookEventType string
const ( WebhookEventPostCallTranscription WebhookEventType = "post_call_transcription" WebhookEventPostCallAudio WebhookEventType = "post_call_audio" WebhookEventCallInitiationFailure WebhookEventType = "call_initiation_failure" WebhookEventVoiceRemovalNotice WebhookEventType = "voice_removal_notice" WebhookEventVoiceRemovalNoticeWithdrawn WebhookEventType = "voice_removal_notice_withdrawn" WebhookEventVoiceRemoved WebhookEventType = "voice_removed" WebhookEventFlowsGeneration WebhookEventType = "flows_generation" WebhookEventFlowsTemplateRun WebhookEventType = "flows_template_run" WebhookEventSpeechToTextTranscription WebhookEventType = "speech_to_text_transcription" )
func (WebhookEventType) String ¶ added in v0.0.2
func (t WebhookEventType) String() string
type WebhookFilterFunc ¶ added in v0.0.2
type WebhookList ¶ added in v0.0.2
type WebhookList struct {
Webhooks Webhooks `json:"webhooks"`
}
type WebhookStatusResult ¶ added in v0.0.2
type WebhookStatusResult struct {
Status string `json:"status"`
}
type WebhookSubscriptionEvent ¶ added in v0.0.2
type WebhookSubscriptionEvent string
const ( WebhookSubscriptionVoiceLibraryRemovalNotice WebhookSubscriptionEvent = "voice_library_removal_notice" WebhookSubscriptionSpeechToText WebhookSubscriptionEvent = "speech_to_text" WebhookSubscriptionAgentQA WebhookSubscriptionEvent = "agent_qa" WebhookSubscriptionFlows WebhookSubscriptionEvent = "flows" )
func (WebhookSubscriptionEvent) String ¶ added in v0.0.2
func (e WebhookSubscriptionEvent) String() string
type WebhookUsage ¶ added in v0.0.2
type WebhookUsage struct {
UsageType WebhookUsageType `json:"usage_type"`
}
type WebhookUsageType ¶ added in v0.0.2
type WebhookUsageType string
const ( WebhookUsageConvAIAgentSettings WebhookUsageType = "ConvAI Agent Settings" WebhookUsageConvAISettings WebhookUsageType = "ConvAI Settings" WebhookUsageVoiceLibraryRemovalNotices WebhookUsageType = "Voice Library Removal Notices" WebhookUsageSpeechToText WebhookUsageType = "Speech to Text" WebhookUsageAgentQAEvaluations WebhookUsageType = "Agent QA Evaluations" WebhookUsageConvAIAlerting WebhookUsageType = "ConvAI Alerting" WebhookUsageFlows WebhookUsageType = "Flows" WebhookUsageDubbing WebhookUsageType = "Dubbing" )
func (WebhookUsageType) String ¶ added in v0.0.2
func (t WebhookUsageType) String() string