-
Notifications
You must be signed in to change notification settings - Fork 578
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
Remove functionResponse
accessor, and mark functionCallingConfig
nullable
#6373
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
…nullable There's no need for the response accessor, as under normal circunstances there's no need to have easy access to the [FunctionResponsePart] the app adds to a prompt. Additionally, to make evolving the API easier and backward compatible, made `functionCallingConfig` parameter nullable in `ToolConfig`.
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerateContentResponse.html 2024-10-10 21:35:08.964641726 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/GenerateContentResponse.html 2024-10-10 21:33:07.392815548 +0000
@@ -40,13 +40,6 @@
</td>
</tr>
<tr>
- <td><code>final <a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a></code></td>
- <td>
- <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerateContentResponse.html#functionResponse()">functionResponse</a></code></div>
- <p>Convenience field representing the first function response part in the response, if it exists.</p>
- </td>
- </tr>
- <tr>
<td><code>final <a href="/docs/reference/android/com/google/firebase/vertexai/type/PromptFeedback.html">PromptFeedback</a></code></td>
<td>
<div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerateContentResponse.html#promptFeedback()">promptFeedback</a></code></div>
@@ -101,11 +94,6 @@
<pre class="api-signature no-pretty-print">public final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <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="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerateContentResponse.html#functionCalls()">functionCalls</a></pre>
<p>Convenience field to get all the function call parts in the request, if they exist</p>
</div>
- <div class="api-item"><a name="getFunctionResponse()"></a><a name="setFunctionResponse()"></a><a name="getFunctionResponse--"></a><a name="setFunctionResponse--"></a>
- <h3 class="api-name" id="functionResponse()">functionResponse</h3>
- <pre class="api-signature no-pretty-print">public final <a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerateContentResponse.html#functionResponse()">functionResponse</a></pre>
- <p>Convenience field representing the first function response part in the response, if it exists.</p>
- </div>
<div class="api-item"><a name="getPromptFeedback()"></a><a name="setPromptFeedback()"></a><a name="getPromptFeedback--"></a><a name="setPromptFeedback--"></a>
<h3 class="api-name" id="promptFeedback()">promptFeedback</h3>
<pre class="api-signature no-pretty-print">public final <a href="/docs/reference/android/com/google/firebase/vertexai/type/PromptFeedback.html">PromptFeedback</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/GenerateContentResponse.html#promptFeedback()">promptFeedback</a></pre> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ToolConfig.html 2024-10-10 21:35:08.960641730 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ToolConfig.html 2024-10-10 21:33:07.388815553 +0000
@@ -27,7 +27,7 @@
<tbody class="list">
<tr>
<td>
- <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</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/FunctionCallingConfig.html">FunctionCallingConfig</a> functionCallingConfig)</code></div>
+ <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</a>(<a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a> functionCallingConfig)</code></div>
</td>
</tr>
</tbody>
@@ -37,7 +37,7 @@
<h2>Public constructors</h2>
<div class="api-item"><a name="ToolConfig-com.google.firebase.vertexai.type.FunctionCallingConfig-"></a><a name="toolconfig"></a>
<h3 class="api-name" id="ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</h3>
- <pre class="api-signature no-pretty-print">public <a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</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/FunctionCallingConfig.html">FunctionCallingConfig</a> functionCallingConfig)</pre>
+ <pre class="api-signature no-pretty-print">public <a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</a>(<a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a> functionCallingConfig)</pre>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -51,7 +51,7 @@
</thead>
<tbody class="list">
<tr>
- <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a> functionCallingConfig</code></td>
+ <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a> functionCallingConfig</code></td>
<td>
<p>The config for function calling</p>
</td> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html 2024-10-10 21:35:08.956641737 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html 2024-10-10 21:33:07.384815559 +0000
@@ -60,13 +60,6 @@
</td>
</tr>
<tr>
- <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>?</code></td>
- <td>
- <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html#functionResponse()">functionResponse</a></code></div>
- <p>Convenience field representing the first function response part in the response, if it exists.</p>
- </td>
- </tr>
- <tr>
<td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptFeedback.html">PromptFeedback</a>?</code></td>
<td>
<div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html#promptFeedback()">promptFeedback</a></code></div>
@@ -108,11 +101,6 @@
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html#functionCalls()">functionCalls</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>></pre>
<p>Convenience field to get all the function call parts in the request, if they exist</p>
</div>
- <div class="api-item"><a name="getFunctionResponse()"></a><a name="setFunctionResponse()"></a><a name="getFunctionResponse--"></a><a name="setFunctionResponse--"></a>
- <h3 class="api-name" id="functionResponse()">functionResponse</h3>
- <pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html#functionResponse()">functionResponse</a>: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>?</pre>
- <p>Convenience field representing the first function response part in the response, if it exists.</p>
- </div>
<div class="api-item"><a name="getPromptFeedback()"></a><a name="setPromptFeedback()"></a><a name="getPromptFeedback--"></a><a name="setPromptFeedback--"></a>
<h3 class="api-name" id="promptFeedback()">promptFeedback</h3>
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.html#promptFeedback()">promptFeedback</a>: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptFeedback.html">PromptFeedback</a>?</pre> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ToolConfig.html 2024-10-10 21:35:08.956641737 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ToolConfig.html 2024-10-10 21:33:07.380815564 +0000
@@ -27,7 +27,7 @@
<tbody class="list">
<tr>
<td>
- <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</a>(functionCallingConfig: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a>)</code></div>
+ <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</a>(functionCallingConfig: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a>?)</code></div>
</td>
</tr>
</tbody>
@@ -37,7 +37,7 @@
<h2>Public constructors</h2>
<div class="api-item"><a name="ToolConfig-com.google.firebase.vertexai.type.FunctionCallingConfig-"></a><a name="toolconfig"></a>
<h3 class="api-name" id="ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</h3>
- <pre class="api-signature no-pretty-print"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</a>(functionCallingConfig: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a>)</pre>
+ <pre class="api-signature no-pretty-print"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html#ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig)">ToolConfig</a>(functionCallingConfig: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a>?)</pre>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -51,7 +51,7 @@
</thead>
<tbody class="list">
<tr>
- <td><code>functionCallingConfig: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a></code></td>
+ <td><code>functionCallingConfig: <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a>?</code></td>
<td>
<p>The config for function calling</p>
</td> |
daymxn
reviewed
Oct 10, 2024
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt
Show resolved
Hide resolved
daymxn
reviewed
Oct 10, 2024
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/internal/util/conversions.kt
Outdated
Show resolved
Hide resolved
…/internal/util/conversions.kt Co-authored-by: Daymon <[email protected]>
daymxn
approved these changes
Oct 10, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
There's no need for the response accessor, as under normal circunstances there's no need to have easy access to the [FunctionResponsePart] the app adds to a prompt.
Additionally, to make evolving the API easier and backward compatible, made
functionCallingConfig
parameter nullable inToolConfig
.