Add benchmark reports and test results with metrics and visualizations
This commit is contained in:
1 parent
a6f82d5a0b
commit
1838c1d559
23 files changed
+1242
-187
No files matched your search
+13
-3
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user