Skip to content

Add support for allowed_function_names #6273

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

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Sep 18, 2024

A note about @SerialName("allowed_function_names"): This is not strictly necessary, the backend will parse it if it's camel case too. We should eventually remove all unnecessary @SerialName declarations, but for now, and to keep consistency, I'm adding it to this declaration.

A note about `@SerialName("allowed_function_names")`: This is not
strictly necessary, the backend will parse it if it's camel case
too. We should eventually remove all unnecessary `@SerialName`
declarations, but for now, and to keep consistency, I'm adding it to
this declaration.
@rlazo rlazo requested review from daymxn and emilypgoogle and removed request for daymxn September 18, 2024 16:49
Copy link
Contributor

github-actions bot commented Sep 18, 2024

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html	2024-09-18 16:56:10.816575384 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html	2024-09-18 16:54:06.952117001 +0000
@@ -47,6 +47,13 @@
         </thead>
         <tbody class="list">
           <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;</code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#allowedFunctionNames()">allowedFunctionNames</a></code></div>
+              <p>Function names to call.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code>final @<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.Mode.html">FunctionCallingConfig.Mode</a></code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#mode()">mode</a></code></div>
@@ -70,7 +77,7 @@
         <tbody class="list">
           <tr>
             <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode)">FunctionCallingConfig</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.Mode.html">FunctionCallingConfig.Mode</a>&nbsp;mode)</code></div>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode,kotlin.collections.List)">FunctionCallingConfig</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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.Mode.html">FunctionCallingConfig.Mode</a>&nbsp;mode,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;&nbsp;allowedFunctionNames<br>)</code></div>
             </td>
           </tr>
         </tbody>
@@ -78,6 +85,11 @@
     </div>
     <div class="list">
       <h2>Public fields</h2>
+      <div class="api-item"><a name="getAllowedFunctionNames()"></a><a name="setAllowedFunctionNames()"></a><a name="getAllowedFunctionNames--"></a><a name="setAllowedFunctionNames--"></a>
+        <h3 class="api-name" id="allowedFunctionNames()">allowedFunctionNames</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#allowedFunctionNames()">allowedFunctionNames</a></pre>
+        <p>Function names to call. Only set when the <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>. Function names should match <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionDeclaration.html#name()">FunctionDeclaration.name</a></code>. With <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>, model will predict a function call from the set of function names provided.</p>
+      </div>
       <div class="api-item"><a name="getMode()"></a><a name="setMode()"></a><a name="getMode--"></a><a name="setMode--"></a>
         <h3 class="api-name" id="mode()">mode</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<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.Mode.html">FunctionCallingConfig.Mode</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#mode()">mode</a></pre>
@@ -86,9 +98,9 @@
     </div>
     <div class="list">
       <h2>Public constructors</h2>
-      <div class="api-item"><a name="FunctionCallingConfig-com.google.firebase.vertexai.type.FunctionCallingConfig.Mode-"></a><a name="functioncallingconfig"></a>
-        <h3 class="api-name" id="FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode)">FunctionCallingConfig</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode)">FunctionCallingConfig</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.Mode.html">FunctionCallingConfig.Mode</a>&nbsp;mode)</pre>
+      <div class="api-item"><a name="FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode, kotlin.collections.List)"></a><a name="FunctionCallingConfig-com.google.firebase.vertexai.type.FunctionCallingConfig.Mode-kotlin.collections.List-"></a><a name="functioncallingconfig"></a>
+        <h3 class="api-name" id="FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode,kotlin.collections.List)">FunctionCallingConfig</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode,kotlin.collections.List)">FunctionCallingConfig</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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.Mode.html">FunctionCallingConfig.Mode</a>&nbsp;mode,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;&nbsp;allowedFunctionNames<br>)</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
@@ -107,6 +119,12 @@
                   <p>The function calling mode of the model</p>
                 </td>
               </tr>
+              <tr>
+                <td><code><a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;&nbsp;allowedFunctionNames</code></td>
+                <td>
+                  <p>Function names to call. Only set when the <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>. Function names should match <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionDeclaration.html#name()">FunctionDeclaration.name</a></code>. With <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>, model will predict a function call from the set of function names provided.</p>
+                </td>
+              </tr>
             </tbody>
           </table>
         </div>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html	2024-09-18 16:56:10.820575400 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html	2024-09-18 16:54:06.956117016 +0000
@@ -27,8 +27,8 @@
           <tr>
             <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html">ToolConfig</a></code></td>
             <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always()">always</a>()</code></div>
-              <p>Shorthand to construct a ToolConfig that restricts the model to always call some function</p>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always(kotlin.collections.List)">always</a>(<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;&nbsp;allowedFunctionNames)</code></div>
+              <p>Shorthand to construct a ToolConfig that restricts the model to always call some function.</p>
             </td>
           </tr>
           <tr>
@@ -43,10 +43,10 @@
     </div>
     <div class="list">
       <h2>Public methods</h2>
-      <div class="api-item"><a name="always--"></a><a name="always"></a>
-        <h3 class="api-name" id="always()">always</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html">ToolConfig</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always()">always</a>()</pre>
-        <p>Shorthand to construct a ToolConfig that restricts the model to always call some function</p>
+      <div class="api-item"><a name="always-kotlin.collections.List-"></a><a name="always"></a>
+        <h3 class="api-name" id="always(kotlin.collections.List)">always</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.html">ToolConfig</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always(kotlin.collections.List)">always</a>(<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<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>&gt;&nbsp;allowedFunctionNames)</pre>
+        <p>Shorthand to construct a ToolConfig that restricts the model to always call some function. You can optionally <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always(kotlin.collections.List)">allowedFunctionNames</a></code> to restrict the model to only call these functions. See <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a></code> for more information.</p>
       </div>
       <div class="api-item"><a name="never--"></a><a name="never"></a>
         <h3 class="api-name" id="never()">never</h3>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html	2024-09-18 16:56:10.808575354 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html	2024-09-18 16:54:06.944116970 +0000
@@ -48,7 +48,7 @@
         <tbody class="list">
           <tr>
             <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode)">FunctionCallingConfig</a>(mode:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html">FunctionCallingConfig.Mode</a>)</code></div>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode,kotlin.collections.List)">FunctionCallingConfig</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;mode:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html">FunctionCallingConfig.Mode</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;allowedFunctionNames:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;?<br>)</code></div>
             </td>
           </tr>
         </tbody>
@@ -67,6 +67,13 @@
         </thead>
         <tbody class="list">
           <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;?</code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#allowedFunctionNames()">allowedFunctionNames</a></code></div>
+              <p>Function names to call.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html">FunctionCallingConfig.Mode</a></code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#mode()">mode</a></code></div>
@@ -78,9 +85,9 @@
     </div>
     <div class="list">
       <h2>Public constructors</h2>
-      <div class="api-item"><a name="FunctionCallingConfig-com.google.firebase.vertexai.type.FunctionCallingConfig.Mode-"></a><a name="functioncallingconfig"></a>
-        <h3 class="api-name" id="FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode)">FunctionCallingConfig</h3>
-        <pre class="api-signature no-pretty-print"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode)">FunctionCallingConfig</a>(mode:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html">FunctionCallingConfig.Mode</a>)</pre>
+      <div class="api-item"><a name="FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode, kotlin.collections.List)"></a><a name="FunctionCallingConfig-com.google.firebase.vertexai.type.FunctionCallingConfig.Mode-kotlin.collections.List-"></a><a name="functioncallingconfig"></a>
+        <h3 class="api-name" id="FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode,kotlin.collections.List)">FunctionCallingConfig</h3>
+        <pre class="api-signature no-pretty-print"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#FunctionCallingConfig(com.google.firebase.vertexai.type.FunctionCallingConfig.Mode,kotlin.collections.List)">FunctionCallingConfig</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;mode:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html">FunctionCallingConfig.Mode</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;allowedFunctionNames:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;? = null<br>)</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
@@ -99,6 +106,12 @@
                   <p>The function calling mode of the model</p>
                 </td>
               </tr>
+              <tr>
+                <td><code>allowedFunctionNames:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;? = null</code></td>
+                <td>
+                  <p>Function names to call. Only set when the <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>. Function names should match <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.html#name()">FunctionDeclaration.name</a></code>. With <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>, model will predict a function call from the set of function names provided.</p>
+                </td>
+              </tr>
             </tbody>
           </table>
         </div>
@@ -106,6 +119,11 @@
     </div>
     <div class="list">
       <h2>Public properties</h2>
+      <div class="api-item"><a name="getAllowedFunctionNames()"></a><a name="setAllowedFunctionNames()"></a><a name="getAllowedFunctionNames--"></a><a name="setAllowedFunctionNames--"></a>
+        <h3 class="api-name" id="allowedFunctionNames()">allowedFunctionNames</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#allowedFunctionNames()">allowedFunctionNames</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;?</pre>
+        <p>Function names to call. Only set when the <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>. Function names should match <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.html#name()">FunctionDeclaration.name</a></code>. With <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html#ANY">Mode.ANY</a></code>, model will predict a function call from the set of function names provided.</p>
+      </div>
       <div class="api-item"><a name="getMode()"></a><a name="setMode()"></a><a name="getMode--"></a><a name="setMode--"></a>
         <h3 class="api-name" id="mode()">mode</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html#mode()">mode</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.Mode.html">FunctionCallingConfig.Mode</a></pre>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ToolConfig.html	2024-09-18 16:56:10.812575369 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ToolConfig.html	2024-09-18 16:54:06.948116986 +0000
@@ -28,8 +28,8 @@
           <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html">ToolConfig</a></code></td>
             <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always()">always</a>()</code></div>
-              <p>Shorthand to construct a ToolConfig that restricts the model to always call some function</p>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always(kotlin.collections.List)">always</a>(allowedFunctionNames:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;?)</code></div>
+              <p>Shorthand to construct a ToolConfig that restricts the model to always call some function.</p>
             </td>
           </tr>
           <tr>
@@ -86,10 +86,10 @@
     </div>
     <div class="list">
       <h2>Public companion functions</h2>
-      <div class="api-item"><a name="always--"></a><a name="always"></a>
-        <h3 class="api-name" id="always()">always</h3>
-        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always()">always</a>():&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html">ToolConfig</a></pre>
-        <p>Shorthand to construct a ToolConfig that restricts the model to always call some function</p>
+      <div class="api-item"><a name="always-kotlin.collections.List-"></a><a name="always"></a>
+        <h3 class="api-name" id="always(kotlin.collections.List)">always</h3>
+        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always(kotlin.collections.List)">always</a>(allowedFunctionNames:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>&gt;? = null):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.html">ToolConfig</a></pre>
+        <p>Shorthand to construct a ToolConfig that restricts the model to always call some function. You can optionally <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ToolConfig.Companion.html#always(kotlin.collections.List)">allowedFunctionNames</a></code> to restrict the model to only call these functions. See <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.html">FunctionCallingConfig</a></code> for more information.</p>
       </div>
       <div class="api-item"><a name="never--"></a><a name="never"></a>
         <h3 class="api-name" id="never()">never</h3>

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor

Copy link
Contributor

Unit Test Results

  14 files  ±0    14 suites  ±0   14s ⏱️ ±0s
106 tests ±0  106 ✔️ ±0  0 💤 ±0  0 ±0 
212 runs  ±0  212 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 820ba02. ± Comparison against base commit d153670.

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-vertexai

    TypeBase (d153670)Merge (22785e1)Diff
    aar507 kB508 kB+1.27 kB (+0.3%)
    apk (release)9.32 MB9.32 MB+1.36 kB (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/OQPHNVoaVG.html

@rlazo rlazo merged commit e9af231 into main Sep 19, 2024
31 of 32 checks passed
@rlazo rlazo deleted the rl.function.allowed.function.names branch September 19, 2024 05:30
@rlazo rlazo added this to the vertexai-ga milestone Sep 21, 2024
@firebase firebase locked and limited conversation to collaborators Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants