Embeddings Class
- java.
lang. Object - com.
azure. ai. openai. models. Embeddings
- com.
Implements
public final class Embeddings
implements JsonSerializable<Embeddings>
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 from the Json |
|
List<Embedding |
getData()
Get the data property: Embedding values for the prompts submitted in the request. |
|
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 Embeddings fromJson(JsonReader jsonReader)
Reads an instance of Embeddings 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:
getUsage
public EmbeddingsUsage getUsage()
Get the usage property: Usage counts for tokens input using the embeddings API.
Returns: