mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
Merge pull request #677 from yinwm/refactor/model-to-model-name
refactor(config): rename model field to model_name
This commit is contained in:
@@ -73,7 +73,10 @@ func ConvertConfig(data map[string]any) (*config.Config, []string, error) {
|
||||
|
||||
if agents, ok := getMap(data, "agents"); ok {
|
||||
if defaults, ok := getMap(agents, "defaults"); ok {
|
||||
if v, ok := getString(defaults, "model"); ok {
|
||||
// Prefer model_name, fallback to model for backward compatibility
|
||||
if v, ok := getString(defaults, "model_name"); ok {
|
||||
cfg.Agents.Defaults.ModelName = v
|
||||
} else if v, ok := getString(defaults, "model"); ok {
|
||||
cfg.Agents.Defaults.Model = v
|
||||
}
|
||||
if v, ok := getFloat(defaults, "max_tokens"); ok {
|
||||
|
||||
Reference in New Issue
Block a user