| @@ -98,9 +98,8 @@ func ConvertGeminiRequestToClaude(modelName string, inputRawJSON []byte, stream · 97 unmodified lines |
| 98 | // Temperature setting for controlling response randomness | 98 | // Temperature setting for controlling response randomness |
| 99 | if temp := genConfig.Get("temperature"); temp.Exists() { | 99 | if temp := genConfig.Get("temperature"); temp.Exists() { |
| 100 | out, _ = sjson.Set(out, "temperature", temp.Float()) | 100 | out, _ = sjson.Set(out, "temperature", temp.Float()) |
| 101 | } | 101 | } else if topP := genConfig.Get("topP"); topP.Exists() { |
| 102 | // Top P setting for nucleus sampling (filtered out if temperature is set) | 102 | // Top P setting for nucleus sampling (filtered out if temperature is set) |
| 103 | if topP := genConfig.Get("topP"); topP.Exists() && !genConfig.Get("temperature").Exists() { | | |
| 104 | out, _ = sjson.Set(out, "top_p", topP.Float()) | 103 | out, _ = sjson.Set(out, "top_p", topP.Float()) |
| 105 | } | 104 | } |
| 106 | // Stop sequences configuration for custom termination conditions | 105 | // Stop sequences configuration for custom termination conditions |