Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaiduConfig ¶
type BaiduConfig struct {
AppID string `mapstructure:"app_id"`
AppSecret string `mapstructure:"app_secret"`
}
BaiduConfig contains Baidu Translate configuration
type Config ¶
type Config struct {
Global GlobalConfig `mapstructure:"global"`
Google GoogleConfig `mapstructure:"google"`
DeepL DeepLConfig `mapstructure:"deepl"`
Baidu BaiduConfig `mapstructure:"baidu"`
OpenAI OpenAIConfig `mapstructure:"openai"`
}
Config represents the application configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a configuration with default values
type DeepLConfig ¶
type DeepLConfig struct {
APIKey string `mapstructure:"api_key"`
IsFree bool `mapstructure:"is_free"`
Formality string `mapstructure:"formality"`
}
DeepLConfig contains DeepL configuration
type GlobalConfig ¶
type GlobalConfig struct {
InputFile string `mapstructure:"input_file"`
OutputFile string `mapstructure:"output_file"`
SourceLanguage string `mapstructure:"source_language"`
TargetLanguages []string `mapstructure:"target_languages"`
Concurrency int `mapstructure:"concurrency"`
Verbose bool `mapstructure:"verbose"`
}
GlobalConfig contains global configuration settings
type GoogleConfig ¶
type GoogleConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
Glossary string `mapstructure:"glossary"`
}
GoogleConfig contains Google Translate configuration
type OpenAIConfig ¶
type OpenAIConfig struct {
APIKey string `mapstructure:"api_key"`
APIBaseURL string `mapstructure:"api_base_url"`
Model string `mapstructure:"model"`
Temperature float64 `mapstructure:"temperature"`
MaxTokens int `mapstructure:"max_tokens"`
}
OpenAIConfig contains OpenAI configuration
Click to show internal directories.
Click to hide internal directories.