update gemini model

This commit is contained in:
Sakurasan
2024-12-03 16:28:21 +08:00
parent 5181ba4552
commit fde0e46cbd
2 changed files with 3 additions and 1 deletions

View File

@@ -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/

View File

@@ -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
}