-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: explicitly call out that ImagenInlineImage#data is base64 encoded #6785
Conversation
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ImagenInlineImage.html 2025-03-20 14:36:38.017667114 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ImagenInlineImage.html 2025-03-20 14:34:26.754044290 +0000
@@ -29,7 +29,7 @@
<td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> byte[]</code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ImagenInlineImage.html#data()">data</a></code></div>
- <p>Contains the raw bytes of the image</p>
+ <p>Contains the base64-encoded image data.</p>
</td>
</tr>
<tr>
@@ -69,7 +69,7 @@
<div class="api-item"><a name="getData()"></a><a name="setData()"></a><a name="getData--"></a><a name="setData--"></a>
<h3 class="api-name" id="data()">data</h3>
<pre class="api-signature no-pretty-print">public final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> byte[] <a href="/docs/reference/android/com/google/firebase/vertexai/type/ImagenInlineImage.html#data()">data</a></pre>
- <p>Contains the raw bytes of the image</p>
+ <p>Contains the base64-encoded image data.</p>
</div>
<div class="api-item"><a name="getMimeType()"></a><a name="setMimeType()"></a><a name="getMimeType--"></a><a name="setMimeType--"></a>
<h3 class="api-name" id="mimeType()">mimeType</h3> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.html 2025-03-20 14:36:38.006667132 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.html 2025-03-20 14:34:26.744044335 +0000
@@ -51,7 +51,7 @@
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html">ByteArray</a></code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.html#data()">data</a></code></div>
- <p>Contains the raw bytes of the image</p>
+ <p>Contains the base64-encoded image data.</p>
</td>
</tr>
<tr>
@@ -77,7 +77,7 @@
<div class="api-item"><a name="getData()"></a><a name="setData()"></a><a name="getData--"></a><a name="setData--"></a>
<h3 class="api-name" id="data()">data</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.html#data()">data</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html">ByteArray</a></pre>
- <p>Contains the raw bytes of the image</p>
+ <p>Contains the base64-encoded image data.</p>
</div>
<div class="api-item"><a name="getMimeType()"></a><a name="setMimeType()"></a><a name="getMimeType--"></a><a name="setMimeType--"></a>
<h3 class="api-name" id="mimeType()">mimeType</h3> |
Generated by 🚫 Danger |
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt
Outdated
Show resolved
Hide resolved
Coverage Report 1Affected ProductsNo changes between base commit (60a021d) and merge commit (9f906fd).Test Logs |
Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com>
Test Results 18 files - 1 014 18 suites - 1 014 13s ⏱️ - 33m 56s Results for commit dbbc34f. ± Comparison against base commit 60a021d. This pull request removes 5776 tests.
|
Size Report 1Affected ProductsNo changes between base commit (60a021d) and merge commit (9f906fd).Test Logs |
Before we merge this, I think it would be ideal to determine if Going from the other direction (encoding), we don't ask devs to pass in base64-encoded data when using Gemini: firebase-android-sdk/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt Lines 53 to 57 in c1ca021
Internally we encode it as base64 for them: firebase-android-sdk/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt Lines 161 to 167 in c1ca021
If we are allowed to during Public Preview (cc: @rlazo for advice), IMHO, it would be ideal to decode the base64 for devs and to return a binary |
We have discussed this internally and decided to return the decoded inline image - that was the intended behavior all along. (returning the encoded base64 image was an oversight at first launch) Closing this PR in favor of #6800. |
This is meant to match the JS ref docs.
See context in #6786