Skip to content

Commit 7d37a81

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add traffic_type, tool_use_prompt_tokens_details to message GenerateContentResponse.UsageMetadata
PiperOrigin-RevId: 871498028
1 parent c032a51 commit 7d37a81

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

google/cloud/aiplatform/v1/prediction_service.proto

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,25 @@ message GenerateContentResponse {
804804

805805
// Usage metadata about response(s).
806806
message UsageMetadata {
807+
// The type of traffic that this request was processed with, indicating
808+
// which quota is consumed.
809+
enum TrafficType {
810+
// Unspecified request traffic type.
811+
TRAFFIC_TYPE_UNSPECIFIED = 0;
812+
813+
// The request was processed using Pay-As-You-Go quota.
814+
ON_DEMAND = 1;
815+
816+
// Type for Priority Pay-As-You-Go traffic.
817+
ON_DEMAND_PRIORITY = 3;
818+
819+
// Type for Flex traffic.
820+
ON_DEMAND_FLEX = 4;
821+
822+
// Type for Provisioned Throughput traffic.
823+
PROVISIONED_THROUGHPUT = 2;
824+
}
825+
807826
// Number of tokens in the request. When `cached_content` is set, this is
808827
// still the total effective prompt size meaning this includes the number of
809828
// tokens in the cached content.
@@ -835,6 +854,15 @@ message GenerateContentResponse {
835854
// Output only. List of modalities that were returned in the response.
836855
repeated ModalityTokenCount candidates_tokens_details = 11
837856
[(google.api.field_behavior) = OUTPUT_ONLY];
857+
858+
// Output only. A detailed breakdown by modality of the token counts from
859+
// the results of tool executions, which are provided back to the model as
860+
// input.
861+
repeated ModalityTokenCount tool_use_prompt_tokens_details = 12
862+
[(google.api.field_behavior) = OUTPUT_ONLY];
863+
864+
// Output only. The traffic type for this request.
865+
TrafficType traffic_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
838866
}
839867

840868
// Output only. Generated candidates.

0 commit comments

Comments
 (0)