()
| 591 | } |
| 592 | |
| 593 | func ModelRatio2JSONString() string { |
| 594 | modelRatioMapMutex.RLock() |
| 595 | defer modelRatioMapMutex.RUnlock() |
| 596 | |
| 597 | jsonBytes, err := json.Marshal(modelRatioMap) |
| 598 | if err != nil { |
| 599 | common.SysError("error marshalling model ratio: " + err.Error()) |
| 600 | } |
| 601 | return string(jsonBytes) |
| 602 | } |
| 603 | |
| 604 | var defaultImageRatio = map[string]float64{ |
| 605 | "gpt-image-1": 2, |
no test coverage detected