Class: Google::Cloud::AIPlatform::V1::GenerateContentResponse
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::GenerateContentResponse
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/aiplatform/v1/prediction_service.rb
Overview
Response message for [PredictionService.GenerateContent].
Defined Under Namespace
Classes: PromptFeedback, UsageMetadata
Instance Attribute Summary collapse
-
#candidates ⇒ ::Array<::Google::Cloud::AIPlatform::V1::Candidate>
readonly
Output only.
-
#prompt_feedback ⇒ ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback
readonly
Output only.
-
#usage_metadata ⇒ ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata
Usage metadata about the response(s).
Instance Attribute Details
#candidates ⇒ ::Array<::Google::Cloud::AIPlatform::V1::Candidate> (readonly)
Returns Output only. Generated candidates.
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 534 class GenerateContentResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content filter results for a prompt sent in the request. # @!attribute [r] block_reason # @return [::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback::BlockedReason] # Output only. Blocked reason. # @!attribute [r] safety_ratings # @return [::Array<::Google::Cloud::AIPlatform::V1::SafetyRating>] # Output only. Safety ratings. # @!attribute [r] block_reason_message # @return [::String] # Output only. A readable block reason message. class PromptFeedback include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Blocked reason enumeration. module BlockedReason # Unspecified blocked reason. BLOCKED_REASON_UNSPECIFIED = 0 # Candidates blocked due to safety. SAFETY = 1 # Candidates blocked due to other reason. OTHER = 2 # Candidates blocked due to the terms which are included from the # terminology blocklist. BLOCKLIST = 3 # Candidates blocked due to prohibited content. PROHIBITED_CONTENT = 4 end end # Usage metadata about response(s). # @!attribute [rw] prompt_token_count # @return [::Integer] # Number of tokens in the request. When `cached_content` is set, this is # still the total effective prompt size meaning this includes the number of # tokens in the cached content. # @!attribute [rw] candidates_token_count # @return [::Integer] # Number of tokens in the response(s). # @!attribute [rw] total_token_count # @return [::Integer] class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#prompt_feedback ⇒ ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback (readonly)
Returns Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 534 class GenerateContentResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content filter results for a prompt sent in the request. # @!attribute [r] block_reason # @return [::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback::BlockedReason] # Output only. Blocked reason. # @!attribute [r] safety_ratings # @return [::Array<::Google::Cloud::AIPlatform::V1::SafetyRating>] # Output only. Safety ratings. # @!attribute [r] block_reason_message # @return [::String] # Output only. A readable block reason message. class PromptFeedback include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Blocked reason enumeration. module BlockedReason # Unspecified blocked reason. BLOCKED_REASON_UNSPECIFIED = 0 # Candidates blocked due to safety. SAFETY = 1 # Candidates blocked due to other reason. OTHER = 2 # Candidates blocked due to the terms which are included from the # terminology blocklist. BLOCKLIST = 3 # Candidates blocked due to prohibited content. PROHIBITED_CONTENT = 4 end end # Usage metadata about response(s). # @!attribute [rw] prompt_token_count # @return [::Integer] # Number of tokens in the request. When `cached_content` is set, this is # still the total effective prompt size meaning this includes the number of # tokens in the cached content. # @!attribute [rw] candidates_token_count # @return [::Integer] # Number of tokens in the response(s). # @!attribute [rw] total_token_count # @return [::Integer] class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#usage_metadata ⇒ ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata
Returns Usage metadata about the response(s).
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 534 class GenerateContentResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content filter results for a prompt sent in the request. # @!attribute [r] block_reason # @return [::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback::BlockedReason] # Output only. Blocked reason. # @!attribute [r] safety_ratings # @return [::Array<::Google::Cloud::AIPlatform::V1::SafetyRating>] # Output only. Safety ratings. # @!attribute [r] block_reason_message # @return [::String] # Output only. A readable block reason message. class PromptFeedback include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Blocked reason enumeration. module BlockedReason # Unspecified blocked reason. BLOCKED_REASON_UNSPECIFIED = 0 # Candidates blocked due to safety. SAFETY = 1 # Candidates blocked due to other reason. OTHER = 2 # Candidates blocked due to the terms which are included from the # terminology blocklist. BLOCKLIST = 3 # Candidates blocked due to prohibited content. PROHIBITED_CONTENT = 4 end end # Usage metadata about response(s). # @!attribute [rw] prompt_token_count # @return [::Integer] # Number of tokens in the request. When `cached_content` is set, this is # still the total effective prompt size meaning this includes the number of # tokens in the cached content. # @!attribute [rw] candidates_token_count # @return [::Integer] # Number of tokens in the response(s). # @!attribute [rw] total_token_count # @return [::Integer] class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |