Add benchmark reports and test results with metrics and visualizations

This commit is contained in:
Mingor committed 2025-04-22 18:16:20 +08:00
1 parent a6f82d5a0b
commit 1838c1d559
23 files changed
+1242 -187

No files matched your search

+13 -3
View File
@@ -18,9 +18,11 @@ type Config struct {
// APIConfig 表示API相关配置
type APIConfig struct {
Endpoint string `mapstructure:"endpoint"`
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
Endpoint string `mapstructure:"endpoint"`
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
MaxTokens int `mapstructure:"max_tokens"`
Temperature float64 `mapstructure:"temperature"`
}
// PromptTemplatesConfig 表示提示词模板配置
@@ -70,6 +72,14 @@ func LoadConfig(path string) (*Config, error) {
return nil, err
}
// 设置默认值
if config.API.MaxTokens == 0 {
config.API.MaxTokens = 2048
}
if config.API.Temperature == 0 {
config.API.Temperature = 0.7
}
return &config, nil
}