MCPcopy
hub / github.com/QuantumNous/new-api / valueMap

Function valueMap

controller/ratio_sync.go:94–105  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

92}
93
94func valueMap(value any) map[string]any {
95 switch typed := value.(type) {
96 case map[string]any:
97 return typed
98 case map[string]float64:
99 return lo.MapValues(typed, func(value float64, _ string) any { return value })
100 case map[string]string:
101 return lo.MapValues(typed, func(value string, _ string) any { return value })
102 default:
103 return nil
104 }
105}
106
107func asFloat64(value any) (float64, bool) {
108 switch typed := value.(type) {

Callers 2

FetchUpstreamRatiosFunction · 0.85
buildDifferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected