Package version:

Interface ChatCompletionSkill

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

interface ChatCompletionSkill {
    apiKey?: string;
    authIdentity?: SearchIndexerDataIdentity;
    authResourceId?: string;
    batchSize?: number;
    commonModelParameters?: CommonModelParameters;
    context?: string;
    degreeOfParallelism?: number;
    description?: string;
    extraParameters?: {
        [propertyName: string]: unknown;
    };
    extraParametersBehavior?: string;
    httpHeaders?: {
        [propertyName: string]: string;
    };
    httpMethod?: string;
    inputs: InputFieldMappingEntry[];
    name?: string;
    odatatype: "#Microsoft.Skills.Custom.ChatCompletionSkill";
    outputs: OutputFieldMappingEntry[];
    responseFormat?: ChatCompletionResponseFormat;
    timeout?: string;
    uri: string;
}

Hierarchy (view full)

Properties

apiKey?: string

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

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.

authResourceId?: string

Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.

batchSize?: number

The desired batch size which indicates number of documents.

commonModelParameters?: CommonModelParameters

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

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.

degreeOfParallelism?: number

If set, the number of parallel calls that can be made to the Web API.

description?: string

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

extraParameters?: {
    [propertyName: string]: unknown;
}

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

extraParametersBehavior?: string

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

httpHeaders?: {
    [propertyName: string]: string;
}

The headers required to make the http request.

httpMethod?: string

The method for the http request.

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

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

odatatype

Polymorphic discriminator, which specifies the different types this object can be

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.

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

timeout?: string

The desired timeout for the request. Default is 30 seconds.

uri: string

The url for the Web API.