Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ActiveProvider Provider `json:"active_provider"`
Providers map[Provider]ProviderConfig `json:"providers"`
WorkDir string `json:"work_dir,omitempty"`
Theme string `json:"theme"`
Language string `json:"language"`
SystemPrompt string `json:"system_prompt"`
// UserProfile — описание пользователя (кто я, чем занимаюсь)
UserProfile string `json:"user_profile,omitempty"`
// AIInstructions — инструкции для AI (как отвечать, стиль, уровень)
AIInstructions string `json:"ai_instructions,omitempty"`
}
Config — главный конфиг TermCode
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig возвращает конфиг с разумными дефолтами
func (*Config) ActiveProviderConfig ¶
func (c *Config) ActiveProviderConfig() (ProviderConfig, bool)
ActiveProviderConfig возвращает конфиг активного провайдера
type ProviderConfig ¶
type ProviderConfig struct {
BaseURL string `json:"base_url"`
APIKey string `json:"api_key"`
Model string `json:"model"`
// MaxTokens — максимум токенов в одном ответе (0 = авто по модели)
MaxTokens int `json:"max_tokens,omitempty"`
// ContextLength — размер окна контекста (0 = авто по модели)
ContextLength int `json:"context_length,omitempty"`
}
ProviderConfig — настройки одного провайдера
func (ProviderConfig) GetContextLength ¶
func (pc ProviderConfig) GetContextLength() int
GetContextLength возвращает размер контекстного окна
func (ProviderConfig) GetMaxTokens ¶
func (pc ProviderConfig) GetMaxTokens() int
GetMaxTokens возвращает лимит токенов ответа для данного конфига провайдера
Click to show internal directories.
Click to hide internal directories.