Documentation
¶
Index ¶
- Constants
- type AdminConfig
- 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 ContentTransformConfig
- type Crawl4AIContentConfig
- type Crawl4AIService
- type DatabaseConfig
- type DefaultsConfig
- type DialogueProfile
- type FeedConfig
- type GenerationConfig
- type HTTPConfig
- type JinaContentConfig
- 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 AdminConfig ¶ added in v0.9.0
type AdminConfig struct {
TOTPSecret string
}
AdminConfig is environment-only; an empty secret disables all admin routes.
func (AdminConfig) SecretBytes ¶ added in v0.9.0
func (c AdminConfig) SecretBytes() ([]byte, error)
func (AdminConfig) Validate ¶ added in v0.9.0
func (c AdminConfig) Validate() error
type Config ¶
type Config struct {
Admin AdminConfig `yaml:"-" json:"-"`
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"`
Jina JinaContentConfig `yaml:"jina"`
Crawl4AI Crawl4AIContentConfig `yaml:"crawl4ai"`
Transform ContentTransformConfig `yaml:"transform"`
}
type ContentServices ¶
type ContentServices struct {
Jina JinaService `yaml:"jina"`
Crawl4AI Crawl4AIService `yaml:"crawl4ai"`
}
type ContentTransformConfig ¶ added in v0.4.0
type ContentTransformConfig struct {
Type string `yaml:"type"`
}
type Crawl4AIContentConfig ¶ added in v0.4.0
type Crawl4AIContentConfig struct {
Mode *string `yaml:"mode"`
BaseURL *string `yaml:"base_url"`
APIToken *string `yaml:"api_token"`
Proxy *string `yaml:"proxy"`
Timeout *string `yaml:"timeout"`
Filter *string `yaml:"filter"`
}
func (Crawl4AIContentConfig) EffectiveService ¶ added in v0.4.0
func (c Crawl4AIContentConfig) EffectiveService(service Crawl4AIService) Crawl4AIService
type Crawl4AIService ¶ added in v0.4.0
type Crawl4AIService struct {
BaseURL string `yaml:"base_url"`
APIToken string `yaml:"api_token"`
Proxy string `yaml:"proxy"`
Timeout string `yaml:"timeout"`
Mode string `yaml:"mode"`
Filter string `yaml:"filter"`
}
func (Crawl4AIService) EffectiveFilter ¶ added in v0.4.0
func (s Crawl4AIService) EffectiveFilter() string
func (Crawl4AIService) EffectiveMode ¶ added in v0.4.0
func (s Crawl4AIService) EffectiveMode() string
func (Crawl4AIService) TimeoutDuration ¶ added in v0.4.0
func (s Crawl4AIService) TimeoutDuration() (time.Duration, error)
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"`
NoticeFile string `yaml:"notice_file"`
}
func (HTTPConfig) ManagementAddress ¶
func (c HTTPConfig) ManagementAddress() string
type JinaContentConfig ¶ added in v0.4.0
type JinaContentConfig struct {
BaseURL *string `yaml:"base_url"`
APIKey *string `yaml:"api_key"`
Proxy *string `yaml:"proxy"`
Timeout *string `yaml:"timeout"`
Format *string `yaml:"format"`
}
func (JinaContentConfig) EffectiveService ¶ added in v0.4.0
func (c JinaContentConfig) EffectiveService(service JinaService) JinaService
type JinaService ¶
type JinaService struct {
BaseURL string `yaml:"base_url"`
APIKey string `yaml:"api_key"`
Proxy string `yaml:"proxy"`
Timeout string `yaml:"timeout"`
Format string `yaml:"format"`
}
func (JinaService) TimeoutDuration ¶ added in v0.4.0
func (s JinaService) TimeoutDuration() (time.Duration, error)
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.