EmbeddingsResult Class
- java.
lang. Object - com.
azure. ai. inference. models. EmbeddingsResult
- com.
Implements
public final class EmbeddingsResult
implements JsonSerializable<EmbeddingsResult>
Representation of the response data from an embeddings request. Embeddings measure the relatedness of text strings and are commonly used for search, clustering, recommendations, and other similar scenarios.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Embeddings |
fromJson(JsonReader jsonReader)
Reads an instance of Embeddings |
|
List<Embedding |
getData()
Get the data property: Embedding values for the prompts submitted in the request. |
| String |
getId()
Get the id property: Unique identifier for the embeddings result. |
| String |
getModel()
Get the model property: The model ID used to generate this result. |
|
Embeddings |
getUsage()
Get the usage property: Usage counts for tokens input using the embeddings API. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static EmbeddingsResult fromJson(JsonReader jsonReader)
Reads an instance of EmbeddingsResult from the JsonReader.
Parameters:
Returns:
Throws:
getData
public List<EmbeddingItem> getData()
Get the data property: Embedding values for the prompts submitted in the request.
Returns:
getId
public String getId()
Get the id property: Unique identifier for the embeddings result.
Returns:
getModel
public String getModel()
Get the model property: The model ID used to generate this result.
Returns:
getUsage
public EmbeddingsUsage getUsage()
Get the usage property: Usage counts for tokens input using the embeddings API.
Returns: