MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / ModelPrice2JSONString

Function ModelPrice2JSONString

setting/ratio_setting/model_ratio.go:310–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

308}
309
310func ModelPrice2JSONString() string {
311 modelPriceMapMutex.RLock()
312 defer modelPriceMapMutex.RUnlock()
313
314 jsonBytes, err := json.Marshal(modelPriceMap)
315 if err != nil {
316 common.SysError("error marshalling model price: " + err.Error())
317 }
318 return string(jsonBytes)
319}
320
321func UpdateModelPriceByJSONString(jsonStr string) error {
322 modelPriceMapMutex.Lock()

Callers 1

InitOptionMapFunction · 0.92

Calls 2

SysErrorFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected