config

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHTTPTimeout = 30 * time.Second
	SerperHTTPTimeout  = 10 * time.Second // Serper API専用
)

HTTP Configuration

View Source
const (
	MaxToolIterations    = 10 // ツールループ最大回数
	MaxChangeStack       = 10 // Undo履歴最大保存数
	MaxAPIRetries        = 2  // API呼び出し最大リトライ回数
	MaxSameToolCallCount = 3  // 同じツール呼び出しの最大繰り返し回数(ループ検知)
)

Tool Execution Limits

View Source
const (
	OutputTruncateLen   = 5000 // bash出力切り詰め長
	MaxDiffDisplayLines = 15   // diff表示最大行数
	MaxDiffIterations   = 20   // diff比較最大イテレーション
)

Output Display Limits

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfg *Config) error

SaveConfig は設定ファイルを保存

func ValidateModel

func ValidateModel(model string) bool

ValidateModel は任意のモデル名を受け付ける(後方互換のため残す) 注: v0.16.0以降、モデル名の検証は行わない

Types

type Config

type Config struct {
	DefaultProvider string                         `yaml:"default_provider"`
	DefaultModel    string                         `yaml:"default_model"`
	ProviderModels  map[string]ProviderModelConfig `yaml:"provider_models"`
}

Config はXELYON CLIの設定

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig はデフォルト設定

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig は設定ファイルを読み込む

func (*Config) GetModelForProvider

func (c *Config) GetModelForProvider(provider string) string

GetModelForProvider はプロバイダーに対応するデフォルトモデルを取得

func (*Config) ValidateModelForProvider

func (c *Config) ValidateModelForProvider(provider, model string) bool

ValidateModelForProvider は任意のモデル名を受け付ける(後方互換のため残す) 注: v0.16.0以降、モデル名の検証は行わない

type ProviderModelConfig

type ProviderModelConfig struct {
	DefaultModel string `yaml:"default_model"`
}

ProviderModelConfig はプロバイダーごとのモデル設定

Jump to

Keyboard shortcuts

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