-
Notifications
You must be signed in to change notification settings - Fork 572
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
Improve kdoc for GenerationConfig #6261
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-09-17 05:01:31.101156601 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-09-17 04:59:30.969388408 +0000
@@ -49,54 +49,56 @@
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#candidateCount()">candidateCount</a></code></div>
- <p>The max <em>unique</em> responses to return</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">GenerationConfig.candidateCount</a></code>.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#maxOutputTokens()">maxOutputTokens</a></code></div>
- <p>The max tokens to generate per response</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">GenerationConfig.maxOutputTokens</a></code>.</p>
</td>
</tr>
<tr>
<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.Builder.html#responseMimeType()">responseMimeType</a></code></div>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">GenerationConfig.responseMimeType</a></code>.</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.Builder.html#responseSchema()">responseSchema</a></code></div>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">GenerationConfig.responseSchema</a></code>.</p>
</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>
- <p>A list of strings to stop generation on occurrence of</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#stopSequences()">GenerationConfig.stopSequences</a></code>.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#temperature()">temperature</a></code></div>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">GenerationConfig.temperature</a></code>.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topK()">topK</a></code></div>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">GenerationConfig.topK</a></code>.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topP()">topP</a></code></div>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">GenerationConfig.topP</a></code>.</p>
</td>
</tr>
</tbody>
@@ -149,40 +151,42 @@
<div class="api-item"><a name="getCandidateCount()"></a><a name="setCandidateCount()"></a><a name="getCandidateCount--"></a><a name="setCandidateCount--"></a>
<h3 class="api-name" id="candidateCount()">candidateCount</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#candidateCount()">candidateCount</a></pre>
- <p>The max <em>unique</em> responses to return</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">GenerationConfig.candidateCount</a></code>.</p>
</div>
<div class="api-item"><a name="getMaxOutputTokens()"></a><a name="setMaxOutputTokens()"></a><a name="getMaxOutputTokens--"></a><a name="setMaxOutputTokens--"></a>
<h3 class="api-name" id="maxOutputTokens()">maxOutputTokens</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#maxOutputTokens()">maxOutputTokens</a></pre>
- <p>The max tokens to generate per response</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">GenerationConfig.maxOutputTokens</a></code>.</p>
</div>
<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.Builder.html#responseMimeType()">responseMimeType</a></pre>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">GenerationConfig.responseMimeType</a></code>.</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.Builder.html#responseSchema()">responseSchema</a></pre>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">GenerationConfig.responseSchema</a></code>.</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.Builder.html#stopSequences()">stopSequences</a></pre>
- <p>A list of strings to stop generation on occurrence of</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#stopSequences()">GenerationConfig.stopSequences</a></code>.</p>
</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>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#temperature()">temperature</a></pre>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">GenerationConfig.temperature</a></code>.</p>
</div>
<div class="api-item"><a name="getTopK()"></a><a name="setTopK()"></a><a name="getTopK--"></a><a name="setTopK--"></a>
<h3 class="api-name" id="topK()">topK</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topK()">topK</a></pre>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">GenerationConfig.topK</a></code>.</p>
</div>
<div class="api-item"><a name="getTopP()"></a><a name="setTopP()"></a><a name="getTopP--"></a><a name="setTopP--"></a>
<h3 class="api-name" id="topP()">topP</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topP()">topP</a></pre>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">GenerationConfig.topP</a></code>.</p>
</div>
</div>
<div class="list"> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.html 2024-09-17 05:01:31.097156609 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerationConfig.html 2024-09-17 04:59:30.965388414 +0000
@@ -55,56 +55,56 @@
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">candidateCount</a></code></div>
- <p>The max <em>unique</em> responses to return</p>
+ <p>The maximum number of generated response messages to return.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">maxOutputTokens</a></code></div>
- <p>The max tokens to generate per response</p>
+ <p>Specifies the maximum number of tokens that can be generated in the response.</p>
</td>
</tr>
<tr>
<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 MIME type for the generated candidate text.</p>
+ <p>Output response MIME type of the generated candidate text (IANA standard).</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> MIME type.</p>
+ <p>Output schema of the generated candidate text.</p>
</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.html#stopSequences()">stopSequences</a></code></div>
- <p>A list of strings to stop generation on occurrence of</p>
+ <p>A set of up to 5 <code>String</code>s that will stop output generation.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">temperature</a></code></div>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>A parameter controlling the degree of randomness in token selection.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">topK</a></code></div>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>The <code>topK</code> parameter changes how the model selects tokens for output.</p>
</td>
</tr>
<tr>
<td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">topP</a></code></div>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>The <code>topP</code> parameter changes how the model selects tokens for output.</p>
</td>
</tr>
</tbody>
@@ -115,42 +115,63 @@
<div class="api-item"><a name="getCandidateCount()"></a><a name="setCandidateCount()"></a><a name="getCandidateCount--"></a><a name="setCandidateCount--"></a>
<h3 class="api-name" id="candidateCount()">candidateCount</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">candidateCount</a></pre>
- <p>The max <em>unique</em> responses to return</p>
+ <p>The maximum number of generated response messages to return. This value must be between 1, 8, inclusive. If unset, this will default to 1.</p>
+ <ul>
+ <li>
+ <p>Note: Only unique candidates are returned. Higher temperatures are more likely to produce unique candidates. Setting <code>temperature</code> to 0 will always produce exactly one candidate regardless of the <code>candidateCount</code>.</p>
+ </li>
+ </ul>
</div>
<div class="api-item"><a name="getMaxOutputTokens()"></a><a name="setMaxOutputTokens()"></a><a name="getMaxOutputTokens--"></a><a name="setMaxOutputTokens--"></a>
<h3 class="api-name" id="maxOutputTokens()">maxOutputTokens</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">maxOutputTokens</a></pre>
- <p>The max tokens to generate per response</p>
+ <p>Specifies the maximum number of tokens that can be generated in the response. The number of tokens per word varies depending on the language outputted. Defaults to 0 (unbounded).</p>
</div>
<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 MIME type for the generated candidate text. For a list of supported response MIME types, see the <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig#FIELDS.response_mime_type">Vertex AI documentation</a> for a list of supported types.</p>
+ <p>Output response MIME type of the generated candidate text (IANA standard).</p>
+ <p>Supported MIME types depend on the model used, but could include:</p>
+ <ul>
+ <li>
+ <p><code>text/plain</code>: Text output; the default behavior if unspecified.</p>
+ </li>
+ <li>
+ <p><code>application/json</code>: JSON response in the candidates.</p>
+ </li>
+ </ul>
</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> MIME type.</p>
+ <p>Output schema of the generated candidate text. If set, a compatible <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">responseMimeType</a></code> must also be set.</p>
+ <p>Compatible MIME types:</p>
+ <ul>
+ <li>
+ <p><code>application/json</code>: Schema for JSON response.</p>
+ </li>
+ </ul>
+ <p>Refer to the <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output">Control generated output</a> guide for more details.</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>
+ <p>A set of up to 5 <code>String</code>s that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response.</p>
</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>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">temperature</a></pre>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>A parameter controlling the degree of randomness in token selection. A temperature of 0 means that the highest probability tokens are always selected. In this case, responses for a given prompt are mostly deterministic, but a small amount of variation is still possible.</p>
</div>
<div class="api-item"><a name="getTopK()"></a><a name="setTopK()"></a><a name="getTopK--"></a><a name="setTopK--"></a>
<h3 class="api-name" id="topK()">topK</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">topK</a></pre>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>The <code>topK</code> parameter changes how the model selects tokens for output. A <code>topK</code> of 1 means the selected token is the most probable among all the tokens in the model's vocabulary, while a <code>topK</code> of 3 means that the next token is selected from among the 3 most probable using the <code>temperature</code>. For each token selection step, the <code>topK</code> tokens with the highest probabilities are sampled. Tokens are then further filtered based on <code>topP</code> with the final token selected using <code>temperature</code> sampling. Defaults to 40 if unspecified.</p>
</div>
<div class="api-item"><a name="getTopP()"></a><a name="setTopP()"></a><a name="getTopP--"></a><a name="setTopP--"></a>
<h3 class="api-name" id="topP()">topP</h3>
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">topP</a></pre>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>The <code>topP</code> parameter changes how the model selects tokens for output. Tokens are selected from the most to least probable until the sum of their probabilities equals the <code>topP</code> value. For example, if tokens A, B, and C have probabilities of 0.3, 0.2, and 0.1 respectively and the topP value is 0.5, then the model will select either A or B as the next token by using the <code>temperature</code> and exclude C as a candidate. Defaults to 0.95 if unset.</p>
</div>
</div>
</body> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-09-17 05:01:31.093156617 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html 2024-09-17 04:59:30.961388420 +0000
@@ -91,54 +91,56 @@
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#candidateCount()">candidateCount</a></code></div>
- <p>The max <em>unique</em> responses to return</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">GenerationConfig.candidateCount</a></code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#maxOutputTokens()">maxOutputTokens</a></code></div>
- <p>The max tokens to generate per response</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">GenerationConfig.maxOutputTokens</a></code>.</p>
</td>
</tr>
<tr>
<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.Builder.html#responseMimeType()">responseMimeType</a></code></div>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">GenerationConfig.responseMimeType</a></code>.</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.Builder.html#responseSchema()">responseSchema</a></code></div>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">GenerationConfig.responseSchema</a></code>.</p>
</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>
- <p>A list of strings to stop generation on occurrence of</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#stopSequences()">GenerationConfig.stopSequences</a></code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#temperature()">temperature</a></code></div>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">GenerationConfig.temperature</a></code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topK()">topK</a></code></div>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">GenerationConfig.topK</a></code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topP()">topP</a></code></div>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">GenerationConfig.topP</a></code>.</p>
</td>
</tr>
</tbody>
@@ -164,40 +166,42 @@
<div class="api-item"><a name="getCandidateCount()"></a><a name="setCandidateCount()"></a><a name="getCandidateCount--"></a><a name="setCandidateCount--"></a>
<h3 class="api-name" id="candidateCount()">candidateCount</h3>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#candidateCount()">candidateCount</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
- <p>The max <em>unique</em> responses to return</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">GenerationConfig.candidateCount</a></code>.</p>
</div>
<div class="api-item"><a name="getMaxOutputTokens()"></a><a name="setMaxOutputTokens()"></a><a name="getMaxOutputTokens--"></a><a name="setMaxOutputTokens--"></a>
<h3 class="api-name" id="maxOutputTokens()">maxOutputTokens</h3>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#maxOutputTokens()">maxOutputTokens</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
- <p>The max tokens to generate per response</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">GenerationConfig.maxOutputTokens</a></code>.</p>
</div>
<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">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>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">GenerationConfig.responseMimeType</a></code>.</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">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>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseSchema()">GenerationConfig.responseSchema</a></code>.</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">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>
- <p>A list of strings to stop generation on occurrence of</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#stopSequences()">GenerationConfig.stopSequences</a></code>.</p>
</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>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#temperature()">temperature</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</pre>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">GenerationConfig.temperature</a></code>.</p>
</div>
<div class="api-item"><a name="getTopK()"></a><a name="setTopK()"></a><a name="getTopK--"></a><a name="setTopK--"></a>
<h3 class="api-name" id="topK()">topK</h3>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topK()">topK</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">GenerationConfig.topK</a></code>.</p>
</div>
<div class="api-item"><a name="getTopP()"></a><a name="setTopP()"></a><a name="getTopP--"></a><a name="setTopP--"></a>
<h3 class="api-name" id="topP()">topP</h3>
<pre class="api-signature no-pretty-print">var <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.Builder.html#topP()">topP</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</pre>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">GenerationConfig.topP</a></code>.</p>
</div>
</div>
</body> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html 2024-09-17 05:01:31.089156625 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html 2024-09-17 04:59:30.957388425 +0000
@@ -72,56 +72,56 @@
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">candidateCount</a></code></div>
- <p>The max <em>unique</em> responses to return</p>
+ <p>The maximum number of generated response messages to return.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">maxOutputTokens</a></code></div>
- <p>The max tokens to generate per response</p>
+ <p>Specifies the maximum number of tokens that can be generated in the response.</p>
</td>
</tr>
<tr>
<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 MIME type for the generated candidate text.</p>
+ <p>Output response MIME type of the generated candidate text (IANA standard).</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> MIME type.</p>
+ <p>Output schema of the generated candidate text.</p>
</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.html#stopSequences()">stopSequences</a></code></div>
- <p>A list of strings to stop generation on occurrence of</p>
+ <p>A set of up to 5 <code>String</code>s that will stop output generation.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">temperature</a></code></div>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>A parameter controlling the degree of randomness in token selection.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">topK</a></code></div>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>The <code>topK</code> parameter changes how the model selects tokens for output.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">topP</a></code></div>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>The <code>topP</code> parameter changes how the model selects tokens for output.</p>
</td>
</tr>
</tbody>
@@ -141,42 +141,63 @@
<div class="api-item"><a name="getCandidateCount()"></a><a name="setCandidateCount()"></a><a name="getCandidateCount--"></a><a name="setCandidateCount--"></a>
<h3 class="api-name" id="candidateCount()">candidateCount</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#candidateCount()">candidateCount</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
- <p>The max <em>unique</em> responses to return</p>
+ <p>The maximum number of generated response messages to return. This value must be between 1, 8, inclusive. If unset, this will default to 1.</p>
+ <ul>
+ <li>
+ <p>Note: Only unique candidates are returned. Higher temperatures are more likely to produce unique candidates. Setting <code>temperature</code> to 0 will always produce exactly one candidate regardless of the <code>candidateCount</code>.</p>
+ </li>
+ </ul>
</div>
<div class="api-item"><a name="getMaxOutputTokens()"></a><a name="setMaxOutputTokens()"></a><a name="getMaxOutputTokens--"></a><a name="setMaxOutputTokens--"></a>
<h3 class="api-name" id="maxOutputTokens()">maxOutputTokens</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#maxOutputTokens()">maxOutputTokens</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
- <p>The max tokens to generate per response</p>
+ <p>Specifies the maximum number of tokens that can be generated in the response. The number of tokens per word varies depending on the language outputted. Defaults to 0 (unbounded).</p>
</div>
<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 MIME type for the generated candidate text. For a list of supported response MIME types, see the <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig#FIELDS.response_mime_type">Vertex AI documentation</a> for a list of supported types.</p>
+ <p>Output response MIME type of the generated candidate text (IANA standard).</p>
+ <p>Supported MIME types depend on the model used, but could include:</p>
+ <ul>
+ <li>
+ <p><code>text/plain</code>: Text output; the default behavior if unspecified.</p>
+ </li>
+ <li>
+ <p><code>application/json</code>: JSON response in the candidates.</p>
+ </li>
+ </ul>
</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> MIME type.</p>
+ <p>Output schema of the generated candidate text. If set, a compatible <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#responseMimeType()">responseMimeType</a></code> must also be set.</p>
+ <p>Compatible MIME types:</p>
+ <ul>
+ <li>
+ <p><code>application/json</code>: Schema for JSON response.</p>
+ </li>
+ </ul>
+ <p>Refer to the <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output">Control generated output</a> guide for more details.</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>
+ <p>A set of up to 5 <code>String</code>s that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response.</p>
</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>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#temperature()">temperature</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</pre>
- <p>The degree of randomness in token selection, typically between 0 and 1</p>
+ <p>A parameter controlling the degree of randomness in token selection. A temperature of 0 means that the highest probability tokens are always selected. In this case, responses for a given prompt are mostly deterministic, but a small amount of variation is still possible.</p>
</div>
<div class="api-item"><a name="getTopK()"></a><a name="setTopK()"></a><a name="getTopK--"></a><a name="setTopK--"></a>
<h3 class="api-name" id="topK()">topK</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topK()">topK</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
- <p>The sum of probabilities to collect to during token selection</p>
+ <p>The <code>topK</code> parameter changes how the model selects tokens for output. A <code>topK</code> of 1 means the selected token is the most probable among all the tokens in the model's vocabulary, while a <code>topK</code> of 3 means that the next token is selected from among the 3 most probable using the <code>temperature</code>. For each token selection step, the <code>topK</code> tokens with the highest probabilities are sampled. Tokens are then further filtered based on <code>topP</code> with the final token selected using <code>temperature</code> sampling. Defaults to 40 if unspecified.</p>
</div>
<div class="api-item"><a name="getTopP()"></a><a name="setTopP()"></a><a name="getTopP--"></a><a name="setTopP--"></a>
<h3 class="api-name" id="topP()">topP</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerationConfig.html#topP()">topP</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</pre>
- <p>How many tokens to select amongst the highest probabilities</p>
+ <p>The <code>topP</code> parameter changes how the model selects tokens for output. Tokens are selected from the most to least probable until the sum of their probabilities equals the <code>topP</code> value. For example, if tokens A, B, and C have probabilities of 0.3, 0.2, and 0.1 respectively and the topP value is 0.5, then the model will select either A or B as the next token by using the <code>temperature</code> and exclude C as a candidate. Defaults to 0.95 if unset.</p>
</div>
</div>
</body> |
Generated by 🚫 Danger |
Coverage Report 1Affected ProductsNo changes between base commit (e6b4ace) and merge commit (963c467).Test Logs |
Unit Test Results 14 files - 74 14 suites - 74 14s ⏱️ - 2m 25s Results for commit 3092e53. ± Comparison against base commit e6b4ace. This pull request removes 289 tests.
|
Size Report 1Affected Products
Test Logs |
friendly ping |
daymxn
approved these changes
Sep 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.