EmbeddingItem Class
- java.
lang. Object - com.
azure. ai. openai. models. EmbeddingItem
- com.
Implements
public final class EmbeddingItem
implements JsonSerializable<EmbeddingItem>
Representation of a single embeddings relatedness comparison.
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Embedding |
fromJson(JsonReader jsonReader)
Reads an instance of Embedding |
List<Float> |
getEmbedding()
Get the embedding property: List of embeddings value for the input prompt. |
String |
getEmbeddingAsString()
Get the embedding property: List of embeddings value in base64 format for the input prompt. |
String |
getObject()
Get the object property: The object type which is always 'embedding'. |
int |
getPromptIndex()
Get the prompt |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static EmbeddingItem fromJson(JsonReader jsonReader)
Reads an instance of EmbeddingItem from the JsonReader.
Parameters:
Returns:
Throws:
getEmbedding
public List
Get the embedding property: List of embeddings value for the input prompt. These represent a measurement of the vector-based relatedness of the provided input.
Returns:
getEmbeddingAsString
public String getEmbeddingAsString()
Get the embedding property: List of embeddings value in base64 format for the input prompt.
Returns:
getObject
public String getObject()
Get the object property: The object type which is always 'embedding'.
Returns:
getPromptIndex
public int getPromptIndex()
Get the promptIndex property: Index of the prompt to which the EmbeddingItem corresponds.
Returns:
toJson
Applies to
Azure SDK for Java