Share via


AzureOpenAIEmbeddingSkill Class

public final class AzureOpenAIEmbeddingSkill
extends SearchIndexerSkill

Allows you to generate a vector embedding for a given text input using the Azure OpenAI resource.

Constructor Summary

Constructor Description
AzureOpenAIEmbeddingSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs)

Creates an instance of AzureOpenAIEmbeddingSkill class.

Method Summary

Modifier and Type Method and Description
static AzureOpenAIEmbeddingSkill fromJson(JsonReader jsonReader)

Reads an instance of AzureOpenAIEmbeddingSkill from the JsonReader.

String getApiKey()

Get the apiKey property: API key of the designated Azure OpenAI resource.

SearchIndexerDataIdentity getAuthIdentity()

Get the authIdentity property: The user-assigned managed identity used for outbound connections.

String getDeploymentName()

Get the deploymentName property: ID of the Azure OpenAI model deployment on the designated resource.

Integer getDimensions()

Get the dimensions property: The number of dimensions the resulting output embeddings should have.

AzureOpenAIModelName getModelName()

Get the modelName property: The name of the embedding model that is deployed at the provided deploymentId path.

String getOdataType()

Get the odataType property: A URI fragment specifying the type of skill.

String getResourceUrl()

Get the resourceUrl property: The resource URI of the Azure OpenAI resource.

AzureOpenAIEmbeddingSkill setApiKey(String apiKey)

Set the apiKey property: API key of the designated Azure OpenAI resource.

AzureOpenAIEmbeddingSkill setAuthIdentity(SearchIndexerDataIdentity authIdentity)

Set the authIdentity property: The user-assigned managed identity used for outbound connections.

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).

AzureOpenAIEmbeddingSkill setDeploymentName(String deploymentName)

Set the deploymentName property: ID of the Azure OpenAI model deployment on the designated resource.

AzureOpenAIEmbeddingSkill setDescription(String description)

Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.

AzureOpenAIEmbeddingSkill setDimensions(Integer dimensions)

Set the dimensions property: The number of dimensions the resulting output embeddings should have.

AzureOpenAIEmbeddingSkill setModelName(AzureOpenAIModelName modelName)

Set the modelName property: The name of the embedding model that is deployed at the provided deploymentId path.

AzureOpenAIEmbeddingSkill setName(String name)

Set the name property: The name of the skill which uniquely identifies it within the skillset.

AzureOpenAIEmbeddingSkill setResourceUrl(String resourceUrl)

Set the resourceUrl property: The resource URI of the Azure OpenAI resource.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from SearchIndexerSkill

Methods inherited from java.lang.Object

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

fromJson

public static AzureOpenAIEmbeddingSkill fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getApiKey

public String getApiKey()

Get the apiKey property: API key of the designated Azure OpenAI resource.

Returns:

the apiKey value.

getAuthIdentity

public SearchIndexerDataIdentity getAuthIdentity()

Get the authIdentity property: The user-assigned managed identity used for outbound connections.

Returns:

the authIdentity value.

getDeploymentName

public String getDeploymentName()

Get the deploymentName property: ID of the Azure OpenAI model deployment on the designated resource.

Returns:

the deploymentName 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.

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.

getOdataType

public String getOdataType()

Get the odataType property: A URI fragment specifying the type of skill.

Overrides:

AzureOpenAIEmbeddingSkill.getOdataType()

Returns:

the odataType value.

getResourceUrl

public String getResourceUrl()

Get the resourceUrl property: The resource URI of the Azure OpenAI resource.

Returns:

the resourceUrl 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.

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.

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:

AzureOpenAIEmbeddingSkill.setContext(String context)

Parameters:

context

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.

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:

AzureOpenAIEmbeddingSkill.setDescription(String description)

Parameters:

description

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.

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:

AzureOpenAIEmbeddingSkill.setName(String name)

Parameters:

name

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

AzureOpenAIEmbeddingSkill.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to