Documentation
¶
Index ¶
- Constants
- type Config
- func (c *Config) EffectiveContent(source SourceConfig) ContentConfig
- func (c *Config) EffectiveGeneration(source SourceConfig) GenerationConfig
- func (c *Config) EffectiveLLM(source SourceConfig) []string
- func (c *Config) EffectiveLimits(source SourceConfig) LimitsConfig
- func (c *Config) EffectivePodcast(source SourceConfig) PodcastConfig
- func (c *Config) Source(id string) (SourceConfig, bool)
- func (c *Config) Validate() error
- type ContentConfig
- type ContentServices
- type DatabaseConfig
- type DefaultsConfig
- type DialogueProfile
- type FeedConfig
- type GenerationConfig
- type HTTPConfig
- type JinaService
- type JobsConfig
- type LLMService
- type LimitsConfig
- type PodcastConfig
- type QueueConfig
- type RuntimeConfig
- type ScheduleConfig
- type ServicesConfig
- type SourceConfig
- type SpeakerConfig
- type SpeakerVoice
- type StorageConfig
- type TTSService
- type URLMappingConfig
Constants ¶
View Source
const ( EdgeTTSServiceName = "edge" AzureTTSServiceName = "azure" )
View Source
const ( DefaultJobTimeout = 30 * time.Minute DefaultJobFetchPollInterval = 30 * time.Second MinimumJobFetchPollInterval = 100 * time.Millisecond DefaultStorageOperationTimeout = 2 * time.Minute )
View Source
const CurrentVersion = 6
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Version int `yaml:"version"`
Runtime RuntimeConfig `yaml:"runtime"`
Services ServicesConfig `yaml:"services"`
DialogueProfiles map[string]DialogueProfile `yaml:"dialogue_profiles"`
Defaults DefaultsConfig `yaml:"defaults"`
Sources []SourceConfig `yaml:"sources"`
}
func (*Config) EffectiveContent ¶
func (c *Config) EffectiveContent(source SourceConfig) ContentConfig
func (*Config) EffectiveGeneration ¶
func (c *Config) EffectiveGeneration(source SourceConfig) GenerationConfig
func (*Config) EffectiveLLM ¶
func (c *Config) EffectiveLLM(source SourceConfig) []string
func (*Config) EffectiveLimits ¶
func (c *Config) EffectiveLimits(source SourceConfig) LimitsConfig
func (*Config) EffectivePodcast ¶
func (c *Config) EffectivePodcast(source SourceConfig) PodcastConfig
type ContentConfig ¶
type ContentConfig struct {
Type string `yaml:"type"`
URL URLMappingConfig `yaml:"url"`
}
type ContentServices ¶
type ContentServices struct {
Jina JinaService `yaml:"jina"`
}
type DatabaseConfig ¶
type DatabaseConfig struct {
Type string `yaml:"type"`
Host string `yaml:"host"`
Port int `yaml:"port"`
Name string `yaml:"name"`
User string `yaml:"user"`
Password string `yaml:"password"`
SSLMode string `yaml:"ssl_mode"`
}
func (DatabaseConfig) URL ¶
func (c DatabaseConfig) URL() string
type DefaultsConfig ¶
type DefaultsConfig struct {
Schedule ScheduleConfig `yaml:"schedule"`
LLM []string `yaml:"llm"`
Generation GenerationConfig `yaml:"generation"`
Content ContentConfig `yaml:"content"`
Limits LimitsConfig `yaml:"limits"`
Podcast PodcastConfig `yaml:"podcast"`
}
type DialogueProfile ¶
type DialogueProfile struct {
Rate string `yaml:"rate" json:"rate"`
Volume string `yaml:"volume" json:"volume"`
Pitch string `yaml:"pitch" json:"pitch"`
Speakers []SpeakerConfig `yaml:"speakers" json:"speakers"`
}
type FeedConfig ¶
type FeedConfig struct {
URL string `yaml:"url" json:"url"`
}
type GenerationConfig ¶
type HTTPConfig ¶
type HTTPConfig struct {
Listen string `yaml:"listen"`
ManagementListen string `yaml:"management_listen"`
}
func (HTTPConfig) ManagementAddress ¶
func (c HTTPConfig) ManagementAddress() string
type JinaService ¶
type JobsConfig ¶
type JobsConfig struct {
Type string `yaml:"type"`
Timeout string `yaml:"timeout"`
FetchPollInterval string `yaml:"fetch_poll_interval"`
Queues map[string]QueueConfig `yaml:"queues"`
}
func (JobsConfig) FetchPollIntervalDuration ¶ added in v0.2.2
func (c JobsConfig) FetchPollIntervalDuration() (time.Duration, error)
func (JobsConfig) TimeoutDuration ¶
func (c JobsConfig) TimeoutDuration() (time.Duration, error)
type LLMService ¶
type LimitsConfig ¶
type PodcastConfig ¶
type PodcastConfig struct {
MaxAge string `yaml:"max_age" json:"max_age"`
}
type QueueConfig ¶
type QueueConfig struct {
Concurrency int `yaml:"concurrency"`
}
type RuntimeConfig ¶
type RuntimeConfig struct {
HTTP HTTPConfig `yaml:"http"`
Database DatabaseConfig `yaml:"database"`
Jobs JobsConfig `yaml:"jobs"`
Storage StorageConfig `yaml:"storage"`
}
type ScheduleConfig ¶
type ServicesConfig ¶
type ServicesConfig struct {
Content ContentServices `yaml:"content"`
LLM map[string]LLMService `yaml:"llm"`
TTS map[string]TTSService `yaml:"tts"`
}
type SourceConfig ¶
type SourceConfig struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
Enabled bool `yaml:"enabled" json:"enabled"`
Feed FeedConfig `yaml:"feed" json:"feed"`
Schedule ScheduleConfig `yaml:"schedule" json:"schedule"`
Content *ContentConfig `yaml:"content" json:"content,omitempty"`
Generation *GenerationConfig `yaml:"generation" json:"generation,omitempty"`
LLM []string `yaml:"llm" json:"llm,omitempty"`
Limits *LimitsConfig `yaml:"limits" json:"limits,omitempty"`
Podcast *PodcastConfig `yaml:"podcast" json:"podcast,omitempty"`
}
type SpeakerConfig ¶
type SpeakerVoice ¶
func ParseSpeakerVoice ¶
func ParseSpeakerVoice(value string) (SpeakerVoice, error)
func (SpeakerVoice) IsMultiTalker ¶
func (v SpeakerVoice) IsMultiTalker() bool
type StorageConfig ¶
type StorageConfig struct {
Type string `yaml:"type"`
Endpoint string `yaml:"endpoint"`
Region string `yaml:"region"`
AccessKey string `yaml:"access_key"`
SecretKey string `yaml:"secret_key"`
PrivateBucket string `yaml:"private_bucket"`
MediaBucket string `yaml:"media_bucket"`
ForcePathStyle bool `yaml:"force_path_style"`
PublicMediaBaseURL string `yaml:"public_media_base_url"`
Timeout string `yaml:"timeout"`
}
func (StorageConfig) TimeoutDuration ¶
func (c StorageConfig) TimeoutDuration() (time.Duration, error)
type TTSService ¶
type TTSService struct {
Proxy string `yaml:"proxy"`
ConnectTimeout string `yaml:"connect_timeout"`
ReceiveTimeout string `yaml:"receive_timeout"`
Endpoint string `yaml:"endpoint"`
Region string `yaml:"region"`
APIKey string `yaml:"api_key"`
OutputFormat string `yaml:"output_format"`
}
func (TTSService) AzureEndpoint ¶
func (c TTSService) AzureEndpoint() string
type URLMappingConfig ¶
Click to show internal directories.
Click to hide internal directories.