Class AzureOpenAIEmbeddingSkill

java.lang.Object
com.azure.search.documents.indexes.models.SearchIndexerSkill
com.azure.search.documents.indexes.models.AzureOpenAIEmbeddingSkill
All Implemented Interfaces:
com.azure.json.JsonSerializable<SearchIndexerSkill>

public final class AzureOpenAIEmbeddingSkill extends SearchIndexerSkill
Allows you to generate a vector embedding for a given text input using the Azure OpenAI resource.
  • Constructor Details

    • AzureOpenAIEmbeddingSkill

      public AzureOpenAIEmbeddingSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs)
      Creates an instance of AzureOpenAIEmbeddingSkill class.
      Parameters:
      inputs - the inputs value to set.
      outputs - the outputs value to set.
  • Method Details

    • getOdataType

      public String getOdataType()
      Get the odataType property: A URI fragment specifying the type of skill.
      Overrides:
      getOdataType in class SearchIndexerSkill
      Returns:
      the odataType value.
    • getDimensions

      public Integer getDimensions()
      Get the dimensions property: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
      Returns:
      the dimensions value.
    • setDimensions

      public AzureOpenAIEmbeddingSkill setDimensions(Integer dimensions)
      Set the dimensions property: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
      Parameters:
      dimensions - the dimensions value to set.
      Returns:
      the AzureOpenAIEmbeddingSkill object itself.
    • getResourceUrl

      public String getResourceUrl()
      Get the resourceUrl property: The resource URI of the Azure OpenAI resource.
      Returns:
      the resourceUrl value.
    • setResourceUrl

      public AzureOpenAIEmbeddingSkill setResourceUrl(String resourceUrl)
      Set the resourceUrl property: The resource URI of the Azure OpenAI resource.
      Parameters:
      resourceUrl - the resourceUrl value to set.
      Returns:
      the AzureOpenAIEmbeddingSkill object itself.
    • getDeploymentName

      public String getDeploymentName()
      Get the deploymentName property: ID of the Azure OpenAI model deployment on the designated resource.
      Returns:
      the deploymentName value.
    • setDeploymentName

      public AzureOpenAIEmbeddingSkill setDeploymentName(String deploymentName)
      Set the deploymentName property: ID of the Azure OpenAI model deployment on the designated resource.
      Parameters:
      deploymentName - the deploymentName value to set.
      Returns:
      the AzureOpenAIEmbeddingSkill object itself.
    • getApiKey

      public String getApiKey()
      Get the apiKey property: API key of the designated Azure OpenAI resource.
      Returns:
      the apiKey value.
    • setApiKey

      public AzureOpenAIEmbeddingSkill setApiKey(String apiKey)
      Set the apiKey property: API key of the designated Azure OpenAI resource.
      Parameters:
      apiKey - the apiKey value to set.
      Returns:
      the AzureOpenAIEmbeddingSkill object itself.
    • getAuthIdentity

      public SearchIndexerDataIdentity getAuthIdentity()
      Get the authIdentity property: The user-assigned managed identity used for outbound connections.
      Returns:
      the authIdentity value.
    • setAuthIdentity

      public AzureOpenAIEmbeddingSkill setAuthIdentity(SearchIndexerDataIdentity authIdentity)
      Set the authIdentity property: The user-assigned managed identity used for outbound connections.
      Parameters:
      authIdentity - the authIdentity value to set.
      Returns:
      the AzureOpenAIEmbeddingSkill object itself.
    • getModelName

      public AzureOpenAIModelName getModelName()
      Get the modelName property: The name of the embedding model that is deployed at the provided deploymentId path.
      Returns:
      the modelName value.
    • setModelName

      public AzureOpenAIEmbeddingSkill setModelName(AzureOpenAIModelName modelName)
      Set the modelName property: The name of the embedding model that is deployed at the provided deploymentId path.
      Parameters:
      modelName - the modelName value to set.
      Returns:
      the AzureOpenAIEmbeddingSkill object itself.
    • setName

      public AzureOpenAIEmbeddingSkill setName(String name)
      Set the name property: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'.
      Overrides:
      setName in class SearchIndexerSkill
      Parameters:
      name - the name value to set.
      Returns:
      the SearchIndexerSkill object itself.
    • setDescription

      public AzureOpenAIEmbeddingSkill setDescription(String description)
      Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.
      Overrides:
      setDescription in class SearchIndexerSkill
      Parameters:
      description - the description value to set.
      Returns:
      the SearchIndexerSkill object itself.
    • setContext

      public AzureOpenAIEmbeddingSkill setContext(String context)
      Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.
      Overrides:
      setContext in class SearchIndexerSkill
      Parameters:
      context - the context value to set.
      Returns:
      the SearchIndexerSkill object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SearchIndexerSkill>
      Overrides:
      toJson in class SearchIndexerSkill
      Throws:
      IOException
    • fromJson

      public static AzureOpenAIEmbeddingSkill fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AzureOpenAIEmbeddingSkill from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AzureOpenAIEmbeddingSkill if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the AzureOpenAIEmbeddingSkill.