Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0880476

Browse files
committedFeb 18, 2025
feat(firebaseml): update the api
#### firebaseml:v2beta The following keys were added: - schemas.GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata.properties.toolUsePromptTokenCount (Total Keys: 3) - schemas.GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata.properties.toolUsePromptTokensDetails (Total Keys: 3)
1 parent 84eab2a commit 0880476

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed
 

‎docs/dyn/firebaseml_v2beta.projects.locations.publishers.models.html

+19-5
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ <h3>Method Details</h3>
266266
},
267267
&quot;tools&quot;: [ # Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
268268
{ # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
269-
&quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
269+
&quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
270270
},
271271
&quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.
272272
{ # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
@@ -610,7 +610,7 @@ <h3>Method Details</h3>
610610
},
611611
&quot;tools&quot;: [ # Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
612612
{ # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
613-
&quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
613+
&quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
614614
},
615615
&quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.
616616
{ # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
@@ -927,7 +927,14 @@ <h3>Method Details</h3>
927927
&quot;tokenCount&quot;: 42, # Number of tokens.
928928
},
929929
],
930-
&quot;totalTokenCount&quot;: 42, # Total token count for prompt and response candidates.
930+
&quot;toolUsePromptTokenCount&quot;: 42, # Output only. Number of tokens present in tool-use prompt(s).
931+
&quot;toolUsePromptTokensDetails&quot;: [ # Output only. List of modalities that were processed for tool-use request inputs.
932+
{ # Represents token counting info for a single modality.
933+
&quot;modality&quot;: &quot;A String&quot;, # The modality associated with this token count.
934+
&quot;tokenCount&quot;: 42, # Number of tokens.
935+
},
936+
],
937+
&quot;totalTokenCount&quot;: 42, # Total token count for prompt, response candidates, and tool-use prompts (if present).
931938
},
932939
}</pre>
933940
</div>
@@ -1128,7 +1135,7 @@ <h3>Method Details</h3>
11281135
},
11291136
&quot;tools&quot;: [ # Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
11301137
{ # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
1131-
&quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
1138+
&quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
11321139
},
11331140
&quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.
11341141
{ # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
@@ -1445,7 +1452,14 @@ <h3>Method Details</h3>
14451452
&quot;tokenCount&quot;: 42, # Number of tokens.
14461453
},
14471454
],
1448-
&quot;totalTokenCount&quot;: 42, # Total token count for prompt and response candidates.
1455+
&quot;toolUsePromptTokenCount&quot;: 42, # Output only. Number of tokens present in tool-use prompt(s).
1456+
&quot;toolUsePromptTokensDetails&quot;: [ # Output only. List of modalities that were processed for tool-use request inputs.
1457+
{ # Represents token counting info for a single modality.
1458+
&quot;modality&quot;: &quot;A String&quot;, # The modality associated with this token count.
1459+
&quot;tokenCount&quot;: 42, # Number of tokens.
1460+
},
1461+
],
1462+
&quot;totalTokenCount&quot;: 42, # Total token count for prompt, response candidates, and tool-use prompts (if present).
14491463
},
14501464
}</pre>
14511465
</div>

‎googleapiclient/discovery_cache/documents/firebaseml.v2beta.json

+17-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
}
207207
}
208208
},
209-
"revision": "20250203",
209+
"revision": "20250212",
210210
"rootUrl": "https://firebaseml.googleapis.com/",
211211
"schemas": {
212212
"Date": {
@@ -827,8 +827,22 @@
827827
"readOnly": true,
828828
"type": "array"
829829
},
830+
"toolUsePromptTokenCount": {
831+
"description": "Output only. Number of tokens present in tool-use prompt(s).",
832+
"format": "int32",
833+
"readOnly": true,
834+
"type": "integer"
835+
},
836+
"toolUsePromptTokensDetails": {
837+
"description": "Output only. List of modalities that were processed for tool-use request inputs.",
838+
"items": {
839+
"$ref": "GoogleCloudAiplatformV1beta1ModalityTokenCount"
840+
},
841+
"readOnly": true,
842+
"type": "array"
843+
},
830844
"totalTokenCount": {
831-
"description": "Total token count for prompt and response candidates.",
845+
"description": "Total token count for prompt, response candidates, and tool-use prompts (if present).",
832846
"format": "int32",
833847
"type": "integer"
834848
}
@@ -1760,7 +1774,7 @@
17601774
"properties": {
17611775
"codeExecution": {
17621776
"$ref": "GoogleCloudAiplatformV1beta1ToolCodeExecution",
1763-
"description": "Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services."
1777+
"description": "Optional. CodeExecution tool type. Enables the model to execute code as part of generation."
17641778
},
17651779
"functionDeclarations": {
17661780
"description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.",

0 commit comments

Comments
 (0)
Please sign in to comment.