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.
-
#create_time ⇒ ::Google::Protobuf::Timestamp
readonly
Output only.
-
#model_version ⇒ ::String
readonly
Output only.
-
#prompt_feedback ⇒ ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback
readonly
Output only.
-
#response_id ⇒ ::String
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.
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 576 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 [r] thoughts_token_count # @return [::Integer] # Output only. Number of tokens present in thoughts output. # @!attribute [rw] total_token_count # @return [::Integer] # Total token count for prompt and response candidates. # @!attribute [r] cached_content_token_count # @return [::Integer] # Output only. Number of tokens in the cached part in the input (the cached # content). # @!attribute [r] prompt_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were processed in the request input. # @!attribute [r] cache_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities of the cached content in the request # input. # @!attribute [r] candidates_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were returned in the response. class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#create_time ⇒ ::Google::Protobuf::Timestamp (readonly)
Returns Output only. Timestamp when the request is made to the server.
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 576 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 [r] thoughts_token_count # @return [::Integer] # Output only. Number of tokens present in thoughts output. # @!attribute [rw] total_token_count # @return [::Integer] # Total token count for prompt and response candidates. # @!attribute [r] cached_content_token_count # @return [::Integer] # Output only. Number of tokens in the cached part in the input (the cached # content). # @!attribute [r] prompt_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were processed in the request input. # @!attribute [r] cache_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities of the cached content in the request # input. # @!attribute [r] candidates_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were returned in the response. class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#model_version ⇒ ::String (readonly)
Returns Output only. The model version used to generate the response.
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 576 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 [r] thoughts_token_count # @return [::Integer] # Output only. Number of tokens present in thoughts output. # @!attribute [rw] total_token_count # @return [::Integer] # Total token count for prompt and response candidates. # @!attribute [r] cached_content_token_count # @return [::Integer] # Output only. Number of tokens in the cached part in the input (the cached # content). # @!attribute [r] prompt_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were processed in the request input. # @!attribute [r] cache_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities of the cached content in the request # input. # @!attribute [r] candidates_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were returned in the response. 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.
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 576 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 [r] thoughts_token_count # @return [::Integer] # Output only. Number of tokens present in thoughts output. # @!attribute [rw] total_token_count # @return [::Integer] # Total token count for prompt and response candidates. # @!attribute [r] cached_content_token_count # @return [::Integer] # Output only. Number of tokens in the cached part in the input (the cached # content). # @!attribute [r] prompt_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were processed in the request input. # @!attribute [r] cache_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities of the cached content in the request # input. # @!attribute [r] candidates_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were returned in the response. class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#response_id ⇒ ::String (readonly)
Returns Output only. response_id is used to identify each response. It is the encoding of the event_id.
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 576 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 [r] thoughts_token_count # @return [::Integer] # Output only. Number of tokens present in thoughts output. # @!attribute [rw] total_token_count # @return [::Integer] # Total token count for prompt and response candidates. # @!attribute [r] cached_content_token_count # @return [::Integer] # Output only. Number of tokens in the cached part in the input (the cached # content). # @!attribute [r] prompt_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were processed in the request input. # @!attribute [r] cache_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities of the cached content in the request # input. # @!attribute [r] candidates_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were returned in the response. 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).
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 576 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 [r] thoughts_token_count # @return [::Integer] # Output only. Number of tokens present in thoughts output. # @!attribute [rw] total_token_count # @return [::Integer] # Total token count for prompt and response candidates. # @!attribute [r] cached_content_token_count # @return [::Integer] # Output only. Number of tokens in the cached part in the input (the cached # content). # @!attribute [r] prompt_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were processed in the request input. # @!attribute [r] cache_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities of the cached content in the request # input. # @!attribute [r] candidates_tokens_details # @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>] # Output only. List of modalities that were returned in the response. class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |