1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

show image pricing too

This commit is contained in:
Laura
2025-09-30 22:40:03 +02:00
parent 592262f95c
commit 6ef49cc3e8
2 changed files with 8 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import (
type ModelPricing struct {
Input float64 `json:"input"`
Output float64 `json:"output"`
Image float64 `json:"image,omitzero"`
}
type Model struct {
@@ -99,6 +100,7 @@ func LoadModels(initial bool) error {
input, _ := strconv.ParseFloat(model.Pricing.Prompt, 64)
output, _ := strconv.ParseFloat(model.Pricing.Completion, 64)
image, _ := strconv.ParseFloat(model.Pricing.Image, 64)
m := &Model{
ID: model.ID,
@@ -109,6 +111,7 @@ func LoadModels(initial bool) error {
Pricing: ModelPricing{
Input: input * 1000000,
Output: output * 1000000,
Image: image,
},
}