MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / applyOpenclawModelsConfig

Function applyOpenclawModelsConfig

agent/app/service/agents_utils.go:693–704  ·  view source on GitHub ↗
(conf map[string]interface{}, models *modelsConfig)

Source from the content-addressed store, hash-verified

691}
692
693func applyOpenclawModelsConfig(conf map[string]interface{}, models *modelsConfig) error {
694 if models == nil {
695 delete(conf, "models")
696 return nil
697 }
698 modelsMap, err := structToMap(models)
699 if err != nil {
700 return err
701 }
702 conf["models"] = modelsMap
703 return nil
704}
705
706type modelCost struct {
707 Input float64 `json:"input"`

Callers 1

writeOpenclawConfigFunction · 0.85

Calls 1

structToMapFunction · 0.85

Tested by

no test coverage detected