SearchModelFactory.ChatCompletionSkill Method

Definition

A skill that calls a language model via Azure AI Foundry's Chat Completions endpoint.

public static Azure.Search.Documents.Indexes.Models.ChatCompletionSkill ChatCompletionSkill(string name = default, string description = default, string context = default, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.InputFieldMappingEntry> inputs = default, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.OutputFieldMappingEntry> outputs = default, Uri uri = default, Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity authIdentity = default, string apiKey = default, Azure.Search.Documents.Indexes.Models.ChatCompletionCommonModelParameters commonModelParameters = default, System.Collections.Generic.IDictionary<string,BinaryData> extraParameters = default, Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior? extraParametersBehavior = default, Azure.Search.Documents.Indexes.Models.ChatCompletionResponseFormat responseFormat = default);
static member ChatCompletionSkill : string * string * string * seq<Azure.Search.Documents.Indexes.Models.InputFieldMappingEntry> * seq<Azure.Search.Documents.Indexes.Models.OutputFieldMappingEntry> * Uri * Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity * string * Azure.Search.Documents.Indexes.Models.ChatCompletionCommonModelParameters * System.Collections.Generic.IDictionary<string, BinaryData> * Nullable<Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior> * Azure.Search.Documents.Indexes.Models.ChatCompletionResponseFormat -> Azure.Search.Documents.Indexes.Models.ChatCompletionSkill
Public Shared Function ChatCompletionSkill (Optional name As String = Nothing, Optional description As String = Nothing, Optional context As String = Nothing, Optional inputs As IEnumerable(Of InputFieldMappingEntry) = Nothing, Optional outputs As IEnumerable(Of OutputFieldMappingEntry) = Nothing, Optional uri As Uri = Nothing, Optional authIdentity As SearchIndexerDataIdentity = Nothing, Optional apiKey As String = Nothing, Optional commonModelParameters As ChatCompletionCommonModelParameters = Nothing, Optional extraParameters As IDictionary(Of String, BinaryData) = Nothing, Optional extraParametersBehavior As Nullable(Of ChatCompletionExtraParametersBehavior) = Nothing, Optional responseFormat As ChatCompletionResponseFormat = Nothing) As ChatCompletionSkill

Parameters

name
String

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 '#'.

description
String

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

context
String

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.

inputs
IEnumerable<InputFieldMappingEntry>

Inputs of the skills could be a column in the source data set, or the output of an upstream skill.

outputs
IEnumerable<OutputFieldMappingEntry>

The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill.

uri
Uri

The url for the Web API.

authIdentity
SearchIndexerDataIdentity

The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared.

apiKey
String

API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time.

commonModelParameters
ChatCompletionCommonModelParameters

Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied.

extraParameters
IDictionary<String,BinaryData>

Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry's extensibility pattern.

extraParametersBehavior
Nullable<ChatCompletionExtraParametersBehavior>

How extra parameters are handled by Azure AI Foundry. Default is 'error'.

responseFormat
ChatCompletionResponseFormat

Determines how the LLM should format its response. Defaults to 'text' response type.

Returns

A new ChatCompletionSkill instance for mocking.

Applies to