Class: Google::Cloud::AIPlatform::V1::EmbedContentRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/aiplatform/v1/prediction_service.rb

Overview

Request message for PredictionService.EmbedContent.

Defined Under Namespace

Modules: EmbeddingTaskType Classes: EmbedContentConfig

Instance Attribute Summary collapse

Instance Attribute Details

#auto_truncate::Boolean

Deprecated.

This field is deprecated and may be removed in the next major version update.

Returns Optional. Deprecated: Please use EmbedContentConfig.auto_truncate instead. Whether to silently truncate the input content if it's longer than the maximum sequence length.

Returns:

  • (::Boolean)

    Optional. Deprecated: Please use EmbedContentConfig.auto_truncate instead. Whether to silently truncate the input content if it's longer than the maximum sequence length.



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end

#content::Google::Cloud::AIPlatform::V1::Content

Returns Required. Input content to be embedded.

Returns:



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end

#embed_content_config::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbedContentConfig

Returns Optional. Configuration for the EmbedContent request.

Returns:



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end

#model::String

Returns Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*.

Returns:

  • (::String)

    Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end

#output_dimensionality::Integer

Deprecated.

This field is deprecated and may be removed in the next major version update.

Returns Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end.

Returns:

  • (::Integer)

    Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end.



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end

#task_type::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType

Deprecated.

This field is deprecated and may be removed in the next major version update.

Returns Optional. Deprecated: Please use EmbedContentConfig.task_type instead. The task type of the embedding.

Returns:



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end

#title::String

Deprecated.

This field is deprecated and may be removed in the next major version update.

Returns Optional. Deprecated: Please use EmbedContentConfig.title instead. The title for the text.

Returns:

  • (::String)

    Optional. Deprecated: Please use EmbedContentConfig.title instead. The title for the text.



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 734

class EmbedContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configurations for the EmbedContent API.
  # @!attribute [rw] title
  #   @return [::String]
  #     Optional. The title for the text.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] task_type
  #   @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
  #     Optional. The task type of the embedding.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] auto_truncate
  #   @return [::Boolean]
  #     Optional. Whether to silently truncate the input content if it's longer
  #     than the maximum sequence length.
  #
  #     Only applicable to text-only embedding models.
  # @!attribute [rw] output_dimensionality
  #   @return [::Integer]
  #     Optional. Reduced dimension for the output embedding. If set, excessive
  #     values in the output embedding are truncated from the end.
  # @!attribute [rw] document_ocr
  #   @return [::Boolean]
  #     Optional. Whether to enable OCR for document content.
  # @!attribute [rw] audio_track_extraction
  #   @return [::Boolean]
  #     Optional. Whether to extract audio from video content.
  class EmbedContentConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a downstream task the embeddings will be used for.
  module EmbeddingTaskType
    # Unset value, which will default to one of the other enum values.
    UNSPECIFIED = 0

    # Specifies the given text is a query in a search/retrieval setting.
    RETRIEVAL_QUERY = 2

    # Specifies the given text is a document from the corpus being searched.
    RETRIEVAL_DOCUMENT = 3

    # Specifies the given text will be used for STS.
    SEMANTIC_SIMILARITY = 4

    # Specifies that the given text will be classified.
    CLASSIFICATION = 5

    # Specifies that the embeddings will be used for clustering.
    CLUSTERING = 6

    # Specifies that the embeddings will be used for question answering.
    QUESTION_ANSWERING = 7

    # Specifies that the embeddings will be used for fact verification.
    FACT_VERIFICATION = 8

    # Specifies that the embeddings will be used for code retrieval.
    CODE_RETRIEVAL_QUERY = 9
  end
end