History

fix(gemini-executor): uppercase responseModalities

hkfires committed 1 year ago

Commit e370f861 parent 7f266aa1 file · +1 −1Browse files

Unified · Split

internal/runtime/executor/gemini_executor.go+1−1
@@ -494,7 +494,7 @@ func fixGeminiImageAspectRatio(modelName string, rawJSON []byte) []byte { · 493 unmodified lines
494 }494 }
495 495
496 rawJSON, _ = sjson.SetRawBytes(rawJSON, "contents.0.parts", []byte(newPartsJson))496 rawJSON, _ = sjson.SetRawBytes(rawJSON, "contents.0.parts", []byte(newPartsJson))
497 rawJSON, _ = sjson.SetRawBytes(rawJSON, "generationConfig.responseModalities", []byte(`["Image", "Text"]`))497 rawJSON, _ = sjson.SetRawBytes(rawJSON, "generationConfig.responseModalities", []byte(`["IMAGE", "TEXT"]`))
498 }498 }
499 }499 }
500 rawJSON, _ = sjson.DeleteBytes(rawJSON, "generationConfig.imageConfig")500 rawJSON, _ = sjson.DeleteBytes(rawJSON, "generationConfig.imageConfig")