client

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioAsset

type AudioAsset struct {
	StorageKind string `json:"storageKind"`
	Path        string `json:"path,omitempty"`
	MimeType    string `json:"mimeType"`
	SizeBytes   int64  `json:"sizeBytes"`
	DurationMs  int64  `json:"durationMs"`
}

type CatalogReadiness

type CatalogReadiness = framework.Readiness

type Client

type Client struct {
	// contains filtered or unexported fields
}

func FromEnv

func FromEnv() (*Client, error)

func New

func New(opts Options) (*Client, error)

func (*Client) CatalogContracts

func (c *Client) CatalogContracts(ctx context.Context) ([]framework.ModeContract, error)

func (*Client) CatalogProfiles

func (c *Client) CatalogProfiles(ctx context.Context, mode string) ([]framework.ProviderProfile, error)

func (*Client) CatalogReadiness

func (c *Client) CatalogReadiness(ctx context.Context) ([]CatalogReadiness, error)

func (*Client) Config

func (c *Client) Config(ctx context.Context) (map[string]any, error)

func (*Client) CreatePersona

func (c *Client) CreatePersona(ctx context.Context, payload any) (json.RawMessage, error)

func (*Client) CreateRole

func (c *Client) CreateRole(ctx context.Context, payload any) (json.RawMessage, error)

func (*Client) CreateSequence

func (c *Client) CreateSequence(ctx context.Context, payload any) (json.RawMessage, error)

func (*Client) DeletePersona

func (c *Client) DeletePersona(ctx context.Context, id string) error

func (*Client) DeleteRole

func (c *Client) DeleteRole(ctx context.Context, id string) error

func (*Client) DeleteSequence

func (c *Client) DeleteSequence(ctx context.Context, id string) error

func (*Client) DoJSON

func (c *Client) DoJSON(ctx context.Context, method, path string, body, out any) error

func (*Client) Persona

func (c *Client) Persona(ctx context.Context, id string) (json.RawMessage, error)

func (*Client) Personas

func (c *Client) Personas(ctx context.Context) (json.RawMessage, error)

func (*Client) PersonasList

func (c *Client) PersonasList(ctx context.Context) (json.RawMessage, error)

func (*Client) ProviderReadiness

func (c *Client) ProviderReadiness(ctx context.Context, id string) (*CatalogReadiness, error)

func (*Client) RawJSON

func (c *Client) RawJSON(ctx context.Context, method, path string, body any) (json.RawMessage, error)

func (*Client) ReplaceVocabularyEntries

func (c *Client) ReplaceVocabularyEntries(ctx context.Context, language string, entries []DictionaryEntry) ([]DictionaryEntry, error)

func (*Client) Role

func (c *Client) Role(ctx context.Context, id string) (json.RawMessage, error)

func (*Client) Roles

func (c *Client) Roles(ctx context.Context) (json.RawMessage, error)

func (*Client) Sequence

func (c *Client) Sequence(ctx context.Context, id string) (json.RawMessage, error)

func (*Client) Sequences

func (c *Client) Sequences(ctx context.Context) (json.RawMessage, error)

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*Status, error)

func (*Client) TTSSynthesize

func (c *Client) TTSSynthesize(ctx context.Context, input TTSSynthesizeRequest) (*TTSSynthesizeResponse, error)

func (*Client) TTSVoices

func (c *Client) TTSVoices(ctx context.Context) ([]Voice, error)

func (*Client) TranscribeFile

func (c *Client) TranscribeFile(ctx context.Context, path string, opts TranscribeOptions) (*TranscribeResponse, error)

func (*Client) Transcript

func (c *Client) Transcript(ctx context.Context, id int64) (*Transcript, error)

func (*Client) Transcripts

func (c *Client) Transcripts(ctx context.Context, limit int) ([]Transcript, error)

func (*Client) UpdatePersona

func (c *Client) UpdatePersona(ctx context.Context, id string, payload any) (json.RawMessage, error)

func (*Client) UpdateRole

func (c *Client) UpdateRole(ctx context.Context, id string, payload any) (json.RawMessage, error)

func (*Client) UpdateSequence

func (c *Client) UpdateSequence(ctx context.Context, id string, payload any) (json.RawMessage, error)

func (*Client) VocabularyEntries

func (c *Client) VocabularyEntries(ctx context.Context, language string) ([]DictionaryEntry, error)

func (*Client) VoiceAgentSessionSummary

func (c *Client) VoiceAgentSessionSummary(ctx context.Context, id int64) (*VoiceAgentSummary, error)

func (*Client) VoiceAgentSessionTranscript

func (c *Client) VoiceAgentSessionTranscript(ctx context.Context, id int64) (*VoiceAgentTranscript, error)

type ConfigSummary

type ConfigSummary map[string]any

type DictionaryEntry

type DictionaryEntry struct {
	ID         int64     `json:"id,omitempty"`
	Spoken     string    `json:"spoken"`
	Canonical  string    `json:"canonical"`
	Language   string    `json:"language"`
	Source     string    `json:"source,omitempty"`
	Enabled    bool      `json:"enabled"`
	UsageCount int       `json:"usageCount,omitempty"`
	CreatedAt  time.Time `json:"createdAt,omitempty"`
	UpdatedAt  time.Time `json:"updatedAt,omitempty"`
}

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
}

func (HTTPError) Error

func (e HTTPError) Error() string

type Options

type Options struct {
	BaseURL    string
	Token      string
	HTTPClient *http.Client
	UserAgent  string
	Timeout    time.Duration
}

type PersonaResource

type PersonaResource map[string]any

type RoleResource

type RoleResource map[string]any

type SequenceResource

type SequenceResource map[string]any

type Status

type Status struct {
	Status        string         `json:"status"`
	Components    map[string]any `json:"components"`
	UptimeSeconds int64          `json:"uptime_seconds"`
	Version       string         `json:"version"`
}

type TTSSynthesizeRequest

type TTSSynthesizeRequest struct {
	Text   string  `json:"text"`
	Locale string  `json:"locale,omitempty"`
	Voice  string  `json:"voice,omitempty"`
	Speed  float64 `json:"speed,omitempty"`
	Format string  `json:"format,omitempty"`
}

type TTSSynthesizeResponse

type TTSSynthesizeResponse struct {
	AudioBase64 string `json:"audio_base64"`
	Format      string `json:"format"`
	SampleRate  int    `json:"sample_rate,omitempty"`
	DurationMs  int64  `json:"duration_ms,omitempty"`
	Provider    string `json:"provider,omitempty"`
	Voice       string `json:"voice,omitempty"`
}

type TranscribeOptions

type TranscribeOptions struct {
	Language string
	Model    string
	Prompt   string
}

type TranscribeResponse

type TranscribeResponse struct {
	Text       string  `json:"text"`
	Language   string  `json:"language,omitempty"`
	DurationMs int64   `json:"duration_ms"`
	LatencyMs  int64   `json:"latency_ms"`
	Provider   string  `json:"provider,omitempty"`
	Model      string  `json:"model,omitempty"`
	Confidence float64 `json:"confidence,omitempty"`
}

type Transcript

type Transcript struct {
	ID          int64       `json:"id"`
	Text        string      `json:"text"`
	Language    string      `json:"language"`
	Provider    string      `json:"provider"`
	Model       string      `json:"model"`
	DurationMs  int64       `json:"durationMs"`
	LatencyMs   int64       `json:"latencyMs"`
	AudioPath   string      `json:"audioPath,omitempty"`
	Audio       *AudioAsset `json:"audio,omitempty"`
	CreatedAt   time.Time   `json:"createdAt"`
	OwnerUserID string      `json:"ownerUserId,omitempty"`
	OwnerOrgID  string      `json:"ownerOrgId,omitempty"`
	OwnerSource string      `json:"ownerSource,omitempty"`
}

type Voice

type Voice struct {
	Provider  string `json:"provider"`
	ID        string `json:"id"`
	Locale    string `json:"locale"`
	Default   bool   `json:"default"`
	Discovery string `json:"discovery,omitempty"`
}

type VoiceAgentSummary

type VoiceAgentSummary struct {
	ID        int64          `json:"id"`
	Summary   map[string]any `json:"summary"`
	Language  string         `json:"language"`
	CreatedAt time.Time      `json:"created_at"`
}

type VoiceAgentTranscript

type VoiceAgentTranscript struct {
	ID         int64            `json:"id"`
	Transcript string           `json:"transcript"`
	Turns      []map[string]any `json:"turns,omitempty"`
	Language   string           `json:"language"`
	CreatedAt  time.Time        `json:"created_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL