feat: add pricing page

This commit is contained in:
CaIon
2024-05-13 23:02:35 +08:00
parent 21839ed13b
commit 5715fcf8fb
16 changed files with 481 additions and 68 deletions

View File

@@ -178,6 +178,13 @@ func GetModelPrice(name string, printErr bool) (float64, bool) {
return price, true
}
func GetModelPrices() map[string]float64 {
if modelPrice == nil {
modelPrice = DefaultModelPrice
}
return modelPrice
}
func ModelRatio2JSONString() string {
if modelRatio == nil {
modelRatio = DefaultModelRatio
@@ -209,6 +216,13 @@ func GetModelRatio(name string) float64 {
return ratio
}
func GetModelRatios() map[string]float64 {
if modelRatio == nil {
modelRatio = DefaultModelRatio
}
return modelRatio
}
func CompletionRatio2JSONString() string {
if CompletionRatio == nil {
CompletionRatio = DefaultCompletionRatio
@@ -282,3 +296,10 @@ func GetCompletionRatio(name string) float64 {
}
return 1
}
func GetCompletionRatios() map[string]float64 {
if CompletionRatio == nil {
CompletionRatio = DefaultCompletionRatio
}
return CompletionRatio
}