ChatCompletionSkill Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. SearchIndexerSkill - com.
azure. search. documents. indexes. models. ChatCompletionSkill
- com.
- com.
public final class ChatCompletionSkill
extends SearchIndexerSkill
A skill that calls a language model via Azure AI Foundry's Chat Completions endpoint.
Constructor Summary
| Constructor | Description |
|---|---|
| ChatCompletionSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, String url) |
Creates an instance of Chat |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Chat |
fromJson(JsonReader jsonReader)
Reads an instance of Chat |
| String |
getApiKey()
Get the api |
|
Search |
getAuthIdentity()
Get the auth |
|
Chat |
getCommonModelParameters()
Get the common |
| Map<String,Object> |
getExtraParameters()
Get the extra |
|
Chat |
getExtraParametersBehavior()
Get the extra |
| String |
getOdataType()
Get the odata |
|
Chat |
getResponseFormat()
Get the response |
| String |
getUrl()
Get the url property: The url for the Web API. |
|
Chat |
setApiKey(String apiKey)
Set the api |
|
Chat |
setAuthIdentity(SearchIndexerDataIdentity authIdentity)
Set the auth |
|
Chat |
setCommonModelParameters(ChatCompletionCommonModelParameters commonModelParameters)
Set the common |
|
Chat |
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). |
|
Chat |
setDescription(String description)
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill. |
|
Chat |
setExtraParameters(Map<String,Object> extraParameters)
Set the extra |
|
Chat |
setExtraParametersBehavior(ChatCompletionExtraParametersBehavior extraParametersBehavior)
Set the extra |
|
Chat |
setName(String name)
Set the name property: The name of the skill which uniquely identifies it within the skillset. |
|
Chat |
setResponseFormat(ChatCompletionResponseFormat responseFormat)
Set the response |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from SearchIndexerSkill
Methods inherited from java.lang.Object
Constructor Details
ChatCompletionSkill
public ChatCompletionSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, String url)
Creates an instance of ChatCompletionSkill class.
Parameters:
Method Details
fromJson
public static ChatCompletionSkill fromJson(JsonReader jsonReader)
Reads an instance of ChatCompletionSkill from the JsonReader.
Parameters:
Returns:
Throws:
getApiKey
public String getApiKey()
Get the apiKey property: API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time.
Returns:
getAuthIdentity
public SearchIndexerDataIdentity getAuthIdentity()
Get the authIdentity property: 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.
Returns:
getCommonModelParameters
public ChatCompletionCommonModelParameters getCommonModelParameters()
Get the commonModelParameters property: Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied.
Returns:
getExtraParameters
public Map<String,Object> getExtraParameters()
Get the extraParameters property: Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry's extensibility pattern.
Returns:
getExtraParametersBehavior
public ChatCompletionExtraParametersBehavior getExtraParametersBehavior()
Get the extraParametersBehavior property: How extra parameters are handled by Azure AI Foundry. Default is 'error'.
Returns:
getOdataType
public String getOdataType()
Get the odataType property: The discriminator for derived types.
Overrides:
ChatCompletionSkill.getOdataType()Returns:
getResponseFormat
public ChatCompletionResponseFormat getResponseFormat()
Get the responseFormat property: Determines how the LLM should format its response. Defaults to 'text' response type.
Returns:
getUrl
public String getUrl()
Get the url property: The url for the Web API.
Returns:
setApiKey
public ChatCompletionSkill setApiKey(String apiKey)
Set the apiKey property: API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time.
Parameters:
Returns:
setAuthIdentity
public ChatCompletionSkill setAuthIdentity(SearchIndexerDataIdentity authIdentity)
Set the authIdentity property: 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.
Parameters:
Returns:
setCommonModelParameters
public ChatCompletionSkill setCommonModelParameters(ChatCompletionCommonModelParameters commonModelParameters)
Set the commonModelParameters property: Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied.
Parameters:
Returns:
setContext
public ChatCompletionSkill 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:
ChatCompletionSkill.setContext(String context)Parameters:
setDescription
public ChatCompletionSkill setDescription(String description)
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.
Overrides:
ChatCompletionSkill.setDescription(String description)Parameters:
setExtraParameters
public ChatCompletionSkill setExtraParameters(Map<String,Object> extraParameters)
Set the extraParameters property: Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry's extensibility pattern.
Parameters:
Returns:
setExtraParametersBehavior
public ChatCompletionSkill setExtraParametersBehavior(ChatCompletionExtraParametersBehavior extraParametersBehavior)
Set the extraParametersBehavior property: How extra parameters are handled by Azure AI Foundry. Default is 'error'.
Parameters:
Returns:
setName
public ChatCompletionSkill 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:
ChatCompletionSkill.setName(String name)Parameters:
setResponseFormat
public ChatCompletionSkill setResponseFormat(ChatCompletionResponseFormat responseFormat)
Set the responseFormat property: Determines how the LLM should format its response. Defaults to 'text' response type.
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
ChatCompletionSkill.toJson(JsonWriter jsonWriter)Parameters:
Throws: