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

Function UpdateModelRatioByJSONString

setting/ratio_setting/model_ratio.go:353–362  ·  view source on GitHub ↗
(jsonStr string)

Source from the content-addressed store, hash-verified

351}
352
353func UpdateModelRatioByJSONString(jsonStr string) error {
354 modelRatioMapMutex.Lock()
355 defer modelRatioMapMutex.Unlock()
356 modelRatioMap = make(map[string]float64)
357 err := json.Unmarshal([]byte(jsonStr), &modelRatioMap)
358 if err == nil {
359 InvalidateExposedDataCache()
360 }
361 return err
362}
363
364// 处理带有思考预算的模型名称,方便统一定价
365func handleThinkingBudgetModel(name, prefix, wildcard string) string {

Callers 2

ResetModelRatioFunction · 0.92
updateOptionMapFunction · 0.92

Calls 1

Tested by

no test coverage detected