Class EmbeddingsOptions

java.lang.Object
com.azure.ai.openai.models.EmbeddingsOptions

public final class EmbeddingsOptions extends Object
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 Details

    • EmbeddingsOptions

      public EmbeddingsOptions(List<String> input)
      Creates an instance of EmbeddingsOptions class.
      Parameters:
      input - the input value to set.
  • Method Details

    • getUser

      public String 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

      public EmbeddingsOptions setUser(String user)
      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

      public String 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

      public EmbeddingsOptions setModel(String model)
      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

      public List<String> 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.