-
Notifications
You must be signed in to change notification settings - Fork 617
wire through response schema from common #6114
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
Conversation
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-07-19 18:33:53.481358121 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-07-19 18:31:49.965009947 +0000
@@ -66,6 +66,12 @@
</td>
</tr>
<tr>
+ <td><code>final <a href="/docs/reference/android/com/google/firebase/vertexai/type/Schema.html">Schema</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> ?></code></td>
+ <td>
+ <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#responseSchema()">responseSchema</a></code></div>
+ </td>
+ </tr>
+ <tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#stopSequences()">stopSequences</a></code></div>
@@ -154,6 +160,10 @@
<h3 class="api-name" id="responseMimeType()">responseMimeType</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#responseMimeType()">responseMimeType</a></pre>
</div>
+ <div class="api-item"><a name="getResponseSchema()"></a><a name="setResponseSchema()"></a><a name="getResponseSchema--"></a><a name="setResponseSchema--"></a>
+ <h3 class="api-name" id="responseSchema()">responseSchema</h3>
+ <pre class="api-signature no-pretty-print">public final <a href="/docs/reference/android/com/google/firebase/vertexai/type/Schema.html">Schema</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> ?> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#responseSchema()">responseSchema</a></pre>
+ </div>
<div class="api-item"><a name="getStopSequences()"></a><a name="setStopSequences()"></a><a name="getStopSequences--"></a><a name="setStopSequences--"></a>
<h3 class="api-name" id="stopSequences()">stopSequences</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#stopSequences()">stopSequences</a></pre> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.html 2024-07-19 18:33:53.481358121 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.html 2024-07-19 18:31:49.969009962 +0000
@@ -69,6 +69,14 @@
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">responseMimeType</a></code></div>
+ <p>Response type for generated candidate text.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>final <a href="/docs/reference/android/com/google/firebase/vertexai/type/Schema.html">Schema</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> ?></code></td>
+ <td>
+ <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">responseSchema</a></code></div>
+ <p>A schema that the response must adhere to, used with the <code>application/json</code> mimeType.</p>
</td>
</tr>
<tr>
@@ -117,16 +125,17 @@
<div class="api-item"><a name="getResponseMimeType()"></a><a name="setResponseMimeType()"></a><a name="getResponseMimeType--"></a><a name="setResponseMimeType--"></a>
<h3 class="api-name" id="responseMimeType()">responseMimeType</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">responseMimeType</a></pre>
+ <p>Response type for generated candidate text. See the <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig">vertex docs</a> for a list of supported types.</p>
+ </div>
+ <div class="api-item"><a name="getResponseSchema()"></a><a name="setResponseSchema()"></a><a name="getResponseSchema--"></a><a name="setResponseSchema--"></a>
+ <h3 class="api-name" id="responseSchema()">responseSchema</h3>
+ <pre class="api-signature no-pretty-print">public final <a href="/docs/reference/android/com/google/firebase/vertexai/type/Schema.html">Schema</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> ?> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">responseSchema</a></pre>
+ <p>A schema that the response must adhere to, used with the <code>application/json</code> mimeType.</p>
</div>
<div class="api-item"><a name="getStopSequences()"></a><a name="setStopSequences()"></a><a name="getStopSequences--"></a><a name="setStopSequences--"></a>
<h3 class="api-name" id="stopSequences()">stopSequences</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#stopSequences()">stopSequences</a></pre>
<p>A list of strings to stop generation on occurrence of</p>
- <ul>
- <li>
- <p>@property responseMimeType Response type for generated candidate text. See the <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig">vertex docs</a> for a list of supported types.</p>
- </li>
- </ul>
</div>
<div class="api-item"><a name="getTemperature()"></a><a name="setTemperature()"></a><a name="getTemperature--"></a><a name="setTemperature--"></a>
<h3 class="api-name" id="temperature()">temperature</h3> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-07-19 18:33:53.473358099 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-07-19 18:31:49.953009902 +0000
@@ -108,6 +108,12 @@
</td>
</tr>
<tr>
+ <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Schema.html">Schema</a><*>?</code></td>
+ <td>
+ <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#responseSchema()">responseSchema</a></code></div>
+ </td>
+ </tr>
+ <tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#stopSequences()">stopSequences</a></code></div>
@@ -169,6 +175,10 @@
<h3 class="api-name" id="responseMimeType()">responseMimeType</h3>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#responseMimeType()">responseMimeType</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
</div>
+ <div class="api-item"><a name="getResponseSchema()"></a><a name="setResponseSchema()"></a><a name="getResponseSchema--"></a><a name="setResponseSchema--"></a>
+ <h3 class="api-name" id="responseSchema()">responseSchema</h3>
+ <pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#responseSchema()">responseSchema</a>: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Schema.html">Schema</a><*>?</pre>
+ </div>
<div class="api-item"><a name="getStopSequences()"></a><a name="setStopSequences()"></a><a name="getStopSequences--"></a><a name="setStopSequences--"></a>
<h3 class="api-name" id="stopSequences()">stopSequences</h3>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#stopSequences()">stopSequences</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>>?</pre> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html 2024-07-19 18:33:53.477358110 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html 2024-07-19 18:31:49.957009918 +0000
@@ -86,6 +86,14 @@
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">responseMimeType</a></code></div>
+ <p>Response type for generated candidate text.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Schema.html">Schema</a><*>?</code></td>
+ <td>
+ <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">responseSchema</a></code></div>
+ <p>A schema that the response must adhere to, used with the <code>application/json</code> mimeType.</p>
</td>
</tr>
<tr>
@@ -143,16 +151,17 @@
<div class="api-item"><a name="getResponseMimeType()"></a><a name="setResponseMimeType()"></a><a name="getResponseMimeType--"></a><a name="setResponseMimeType--"></a>
<h3 class="api-name" id="responseMimeType()">responseMimeType</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">responseMimeType</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
+ <p>Response type for generated candidate text. See the <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig">vertex docs</a> for a list of supported types.</p>
+ </div>
+ <div class="api-item"><a name="getResponseSchema()"></a><a name="setResponseSchema()"></a><a name="getResponseSchema--"></a><a name="setResponseSchema--"></a>
+ <h3 class="api-name" id="responseSchema()">responseSchema</h3>
+ <pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">responseSchema</a>: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Schema.html">Schema</a><*>?</pre>
+ <p>A schema that the response must adhere to, used with the <code>application/json</code> mimeType.</p>
</div>
<div class="api-item"><a name="getStopSequences()"></a><a name="setStopSequences()"></a><a name="getStopSequences--"></a><a name="setStopSequences--"></a>
<h3 class="api-name" id="stopSequences()">stopSequences</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#stopSequences()">stopSequences</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>>?</pre>
<p>A list of strings to stop generation on occurrence of</p>
- <ul>
- <li>
- <p>@property responseMimeType Response type for generated candidate text. See the <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig">vertex docs</a> for a list of supported types.</p>
- </li>
- </ul>
</div>
<div class="api-item"><a name="getTemperature()"></a><a name="setTemperature()"></a><a name="getTemperature--"></a><a name="setTemperature--"></a>
<h3 class="api-name" id="temperature()">temperature</h3> |
Coverage Report 1Affected ProductsNo changes between base commit (1c03d4b) and merge commit (f179e6e).Test Logs |
Unit Test Results 4 files - 4 4 suites - 4 3s ⏱️ -23s Results for commit 051bbf3. ± Comparison against base commit 1c03d4b. This pull request removes 22 and adds 50 tests. Note that renamed tests count towards both.
|
Size Report 1Affected Products
Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a tests that verifies that the specified schema, in code, is generated as expected, in JSON? You'd need to capture the request and check that the JSON in it has a few key/values as expected. This will ensure that we don't introduce unintended bugs down the road at the vertex/common translation layer
No description provided.