EmbedContentRequest class final

Request containing the Content for the model to embed.

Inheritance
  • Object
  • ProtoMessage
  • EmbedContentRequest

Constructors

EmbedContentRequest({required String model, required Content? content, TaskType? taskType, String? title, int? outputDimensionality})
EmbedContentRequest.fromJson(Object? j)
factory

Properties

content Content?
Required. The content to embed. Only the parts.text fields will be counted.
final
hashCode int
The hash code for this object.
no setterinherited
model String
Required. The model's resource name. This serves as an ID for the Model to use.
final
outputDimensionality int?
Optional. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (models/embedding-001).
final
qualifiedName String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
taskType TaskType?
Optional. Optional task type for which the embeddings will be used. Not supported on earlier models (models/embedding-001).
final
title String?
Optional. An optional title for the text. Only applicable when TaskType is RETRIEVAL_DOCUMENT.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String