Class: Google::Cloud::AIPlatform::V1::UsageMetadata
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::UsageMetadata
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb
Overview
Usage metadata about the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics.
Defined Under Namespace
Modules: TrafficType
Instance Attribute Summary collapse
-
#cache_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
readonly
Output only.
-
#cached_content_token_count ⇒ ::Integer
readonly
Output only.
-
#candidates_token_count ⇒ ::Integer
The total number of tokens in the generated candidates.
-
#candidates_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
readonly
Output only.
-
#prompt_token_count ⇒ ::Integer
The total number of tokens in the prompt.
-
#prompt_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
readonly
Output only.
-
#thoughts_token_count ⇒ ::Integer
readonly
Output only.
-
#tool_use_prompt_token_count ⇒ ::Integer
readonly
Output only.
-
#tool_use_prompt_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
readonly
Output only.
-
#total_token_count ⇒ ::Integer
The total number of tokens for the entire request.
-
#traffic_type ⇒ ::Google::Cloud::AIPlatform::V1::UsageMetadata::TrafficType
readonly
Output only.
Instance Attribute Details
#cache_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount> (readonly)
Returns Output only. A detailed breakdown of the token count for each modality in the cached content.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#cached_content_token_count ⇒ ::Integer (readonly)
Returns Output only. The number of tokens in the cached content that was used for this request.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#candidates_token_count ⇒ ::Integer
Returns The total number of tokens in the generated candidates.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#candidates_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount> (readonly)
Returns Output only. A detailed breakdown of the token count for each modality in the generated candidates.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#prompt_token_count ⇒ ::Integer
Returns The total number of tokens in the prompt. This includes any text, images,
or other media provided in the request. When cached_content is set,
this also includes the number of tokens in the cached content.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#prompt_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount> (readonly)
Returns Output only. A detailed breakdown of the token count for each modality in the prompt.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#thoughts_token_count ⇒ ::Integer (readonly)
Returns Output only. The number of tokens that were part of the model's generated "thoughts" output, if applicable.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#tool_use_prompt_token_count ⇒ ::Integer (readonly)
Returns Output only. The number of tokens in the results from tool executions, which are provided back to the model as input, if applicable.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#tool_use_prompt_tokens_details ⇒ ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount> (readonly)
Returns Output only. A detailed breakdown by modality of the token counts from the results of tool executions, which are provided back to the model as input.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#total_token_count ⇒ ::Integer
Returns The total number of tokens for the entire request. This is the sum of
prompt_token_count, candidates_token_count,
tool_use_prompt_token_count, and thoughts_token_count.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |
#traffic_type ⇒ ::Google::Cloud::AIPlatform::V1::UsageMetadata::TrafficType (readonly)
Returns Output only. The traffic type for this request.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb', line 71 class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of traffic that this request was processed with, indicating which # quota gets consumed. module TrafficType # Unspecified request traffic type. TRAFFIC_TYPE_UNSPECIFIED = 0 # Type for Pay-As-You-Go traffic. ON_DEMAND = 1 # Type for Provisioned Throughput traffic. PROVISIONED_THROUGHPUT = 2 end end |