Package com.azure.ai.openai.models
Class EmbeddingsOptions
java.lang.Object
com.azure.ai.openai.models.EmbeddingsOptions
The configuration information for an embeddings request. Embeddings measure the relatedness of text strings and are
commonly used for search, clustering, recommendations, and other similar scenarios.
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddingsOptions(List<String> input) Creates an instance of EmbeddingsOptions class. -
Method Summary
Modifier and TypeMethodDescriptiongetInput()Get the input property: Input texts to get embeddings for, encoded as a an array of strings.getModel()Get the model property: The model name to provide as part of this embeddings request.getUser()Get the user property: An identifier for the caller or end user of the operation.Set the model property: The model name to provide as part of this embeddings request.Set the user property: An identifier for the caller or end user of the operation.
-
Constructor Details
-
EmbeddingsOptions
Creates an instance of EmbeddingsOptions class.- Parameters:
input- the input value to set.
-
-
Method Details
-
getUser
Get the user property: An identifier for the caller or end user of the operation. This may be used for tracking or rate-limiting purposes.- Returns:
- the user value.
-
setUser
Set the user property: An identifier for the caller or end user of the operation. This may be used for tracking or rate-limiting purposes.- Parameters:
user- the user value to set.- Returns:
- the EmbeddingsOptions object itself.
-
getModel
Get the model property: The model name to provide as part of this embeddings request. Not applicable to Azure OpenAI, where deployment information should be included in the Azure resource URI that's connected to.- Returns:
- the model value.
-
setModel
Set the model property: The model name to provide as part of this embeddings request. Not applicable to Azure OpenAI, where deployment information should be included in the Azure resource URI that's connected to.- Parameters:
model- the model value to set.- Returns:
- the EmbeddingsOptions object itself.
-
getInput
Get the input property: Input texts to get embeddings for, encoded as a an array of strings. Each input must not exceed 2048 tokens in length.Unless you are embedding code, we suggest replacing newlines (\n) in your input with a single space, as we have observed inferior results when newlines are present.
- Returns:
- the input value.
-