VectorEmbedding Class
- java.
lang. Object - com.
azure. resourcemanager. cosmos. models. VectorEmbedding
- com.
Implements
public final class VectorEmbedding
implements JsonSerializable<VectorEmbedding>
Represents a vector embedding. A vector embedding is used to define a vector field in the documents.
Constructor Summary
Constructor | Description |
---|---|
VectorEmbedding() |
Creates an instance of Vector |
Method Summary
Modifier and Type | Method and Description |
---|---|
Vector |
dataType()
Get the data |
int |
dimensions()
Get the dimensions property: The number of dimensions in the vector. |
Distance |
distanceFunction()
Get the distance |
static
Vector |
fromJson(JsonReader jsonReader)
Reads an instance of Vector |
String |
path()
Get the path property: The path to the vector field in the document. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Vector |
withDataType(VectorDataType dataType)
Set the data |
Vector |
withDimensions(int dimensions)
Set the dimensions property: The number of dimensions in the vector. |
Vector |
withDistanceFunction(DistanceFunction distanceFunction)
Set the distance |
Vector |
withPath(String path)
Set the path property: The path to the vector field in the document. |
Methods inherited from java.lang.Object
Constructor Details
VectorEmbedding
public VectorEmbedding()
Creates an instance of VectorEmbedding class.
Method Details
dataType
public VectorDataType dataType()
Get the dataType property: Indicates the data type of vector.
Returns:
dimensions
public int dimensions()
Get the dimensions property: The number of dimensions in the vector.
Returns:
distanceFunction
public DistanceFunction distanceFunction()
Get the distanceFunction property: The distance function to use for distance calculation in between vectors.
Returns:
fromJson
public static VectorEmbedding fromJson(JsonReader jsonReader)
Reads an instance of VectorEmbedding from the JsonReader.
Parameters:
Returns:
Throws:
path
public String path()
Get the path property: The path to the vector field in the document.
Returns:
toJson
validate
public void validate()
Validates the instance.
withDataType
public VectorEmbedding withDataType(VectorDataType dataType)
Set the dataType property: Indicates the data type of vector.
Parameters:
Returns:
withDimensions
public VectorEmbedding withDimensions(int dimensions)
Set the dimensions property: The number of dimensions in the vector.
Parameters:
Returns:
withDistanceFunction
public VectorEmbedding withDistanceFunction(DistanceFunction distanceFunction)
Set the distanceFunction property: The distance function to use for distance calculation in between vectors.
Parameters:
Returns:
withPath
public VectorEmbedding withPath(String path)
Set the path property: The path to the vector field in the document.
Parameters:
Returns:
Applies to
Azure SDK for Java