Skip to content

Commit 11a813f

Browse files
authored
Update inlineData Java specific API to match Kotlin (#6361)
The order of the arguments was changed from (mimeType, bytes) to (bytes, mimeType).
1 parent 4ee86a3 commit 11a813f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public class Chat(
132132
image(bitmap)
133133
}
134134
for (inlineDataPart in inlineDataParts) {
135-
inlineData(inlineDataPart.mimeType, inlineDataPart.inlineData)
135+
inlineData(inlineDataPart.inlineData, inlineDataPart.mimeType)
136136
}
137137
if (text.isNotBlank()) {
138138
text(text.toString())

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Content.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ constructor(public val role: String? = "user", public val parts: List<Part>) {
5959
* [parts] list.
6060
*/
6161
@JvmName("addInlineData")
62-
public fun inlineData(mimeType: String, bytes: ByteArray): Content.Builder =
62+
public fun inlineData(bytes: ByteArray, mimeType: String): Content.Builder =
6363
part(InlineDataPart(bytes, mimeType))
6464

6565
/** Wraps the provided [image] inside an [ImagePart] and adds it to the [parts] list. */

0 commit comments

Comments
 (0)