Commit 2e41362f by CaIon

fix: update budget calculation logic in relay-gemini to use clamping function

parent 6960a063
......@@ -107,13 +107,13 @@ func clampThinkingBudgetByEffort(modelName string, effort string) int {
}
switch effort {
case "high":
return maxBudget * 80 / 100
maxBudget = maxBudget * 80 / 100
case "medium":
return maxBudget * 50 / 100
maxBudget = maxBudget * 50 / 100
case "low":
return maxBudget * 20 / 100
maxBudget = maxBudget * 20 / 100
}
return maxBudget * 50 / 100 // 默认medium
return clampThinkingBudget(modelName, maxBudget)
}
func ThinkingAdaptor(geminiRequest *dto.GeminiChatRequest, info *relaycommon.RelayInfo, oaiRequest ...dto.GeneralOpenAIRequest) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment