diff --git a/pkg/tokenizer/tokenizer.go b/pkg/tokenizer/tokenizer.go index 3151bd3..afd660b 100644 --- a/pkg/tokenizer/tokenizer.go +++ b/pkg/tokenizer/tokenizer.go @@ -179,6 +179,8 @@ func Cost(model string, promptCount, completionCount int) float64 { cost = (0.0035/1000)*float64(prompt) + (0.0105/1000)*float64(completion) case "gemini-1.5-flash-latest": cost = (0.00035/1000)*float64(prompt) + (0.00053/1000)*float64(completion) + case "learnlm-1.5-pro-experimental", " gemini-exp-1114", "gemini-exp-1121": + cost = (0.00035/1000)*float64(prompt) + (0.00053/1000)*float64(completion) // Mistral AI // https://docs.mistral.ai/platform/pricing/ diff --git a/router/chat.go b/router/chat.go index 5292a9f..fa3d2b7 100644 --- a/router/chat.go +++ b/router/chat.go @@ -28,7 +28,7 @@ func ChatHandler(c *gin.Context) { return } - if strings.HasPrefix(chatreq.Model, "gemini") { + if strings.HasPrefix(chatreq.Model, "gemini") || strings.HasPrefix(chatreq.Model, "learnlm") { google.ChatProxy(c, &chatreq) return }