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

Function CompletionRatio2JSONString

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

Source from the content-addressed store, hash-verified

404}
405
406func CompletionRatio2JSONString() string {
407 CompletionRatioMutex.RLock()
408 defer CompletionRatioMutex.RUnlock()
409
410 jsonBytes, err := json.Marshal(CompletionRatio)
411 if err != nil {
412 common.SysError("error marshalling completion ratio: " + err.Error())
413 }
414 return string(jsonBytes)
415}
416
417func UpdateCompletionRatioByJSONString(jsonStr string) error {
418 CompletionRatioMutex.Lock()

Callers 1

InitOptionMapFunction · 0.92

Calls 2

SysErrorFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected