Create an Azure AI studio inference endpoint
- PUT /_inference/{task_type}/{azureaistudio_inference_id}
Create an inference endpoint to perform an inference task with the azureaistudio service.
- Cluster privileges:
manage_inference
Path Parameters
-
task_typeAzureAiStudioTaskTyperequired -
The type of the inference task that the model will perform.
-
Values:
completiontext_embedding -
azureaistudio_inference_idstring Idrequired -
The unique identifier of the inference endpoint.
Query Parameters
-
timeoutstring Duration · default: 30s Specifies the amount of time to wait for the inference endpoint to be created.
Request
-
chunking_settingsInferenceChunkingSettings -
The chunking configuration object.
- Reference
-
max_chunk_sizenumber · default: 250 -
The maximum size of a chunk in words. This value cannot be higher than
300or lower than20(forsentencestrategy) or10(forwordstrategy). -
overlapnumber · default: 100 -
The number of overlapping words for chunks. It is applicable only to a
wordchunking strategy. This value cannot be higher than half themax_chunk_sizevalue. -
sentence_overlapnumber · default: 1 -
The number of overlapping sentences for chunks. It is applicable only for a
sentencechunking strategy. It can be either1or0. -
strategystring · default: sentence -
The chunking strategy:
sentenceorword. -
serviceAzureAiStudioServiceTyperequired -
The type of service supported for the specified task type. In this case,
azureaistudio. -
Values:
azureaistudio -
service_settingsAzureAiStudioServiceSettingsrequired -
Settings used to install the inference model. These settings are specific to the
openaiservice. -
api_keystringrequired -
A valid API key of your Azure AI Studio model deployment. This key can be found on the overview page for your deployment in the management section of your Azure AI Studio account.
IMPORTANT: You need to provide the API key only once, during the inference model creation. The get inference endpoint API does not retrieve your API key.
- External docs
-
endpoint_typestringrequired -
The type of endpoint that is available for deployment through Azure AI Studio:
tokenorrealtime. Thetokenendpoint type is for "pay as you go" endpoints that are billed per token. Therealtimeendpoint type is for "real-time" endpoints that are billed per hour of usage. - External docs
-
targetstringrequired -
The target URL of your Azure AI Studio model deployment. This can be found on the overview page for your deployment in the management section of your Azure AI Studio account.
-
providerstringrequired -
The model provider for your deployment. Note that some providers may support only certain task types. Supported providers include:
cohere- available fortext_embedding,rerankandcompletiontask typesdatabricks- available forcompletiontask type onlymeta- available forcompletiontask type onlymicrosoft_phi- available forcompletiontask type onlymistral- available forcompletiontask type onlyopenai- available fortext_embeddingandcompletiontask types
-
rate_limitRateLimitSetting -
This setting helps to minimize the number of rate limit errors returned from Azure AI Studio. By default, the
azureaistudioservice sets the number of requests allowed per minute to 240. -
requests_per_minutenumber -
The number of requests allowed per minute.
-
task_settingsAzureAiStudioTaskSettings -
Settings to configure the inference task. These settings are specific to the task type you specified.
-
do_samplenumber -
For a
completiontask, instruct the inference process to perform sampling. It has no effect unlesstemperatureortop_pis specified. -
max_new_tokensnumber · default: 64 -
For a
completiontask, provide a hint for the maximum number of output tokens to be generated. -
temperaturenumber -
For a
completiontask, control the apparent creativity of generated completions with a sampling temperature. It must be a number in the range of 0.0 to 2.0. It should not be used iftop_pis specified. -
top_pnumber -
For a
completiontask, make the model consider the results of the tokens with nucleus sampling probability. It is an alternative value totemperatureand must be a number in the range of 0.0 to 2.0. It should not be used iftemperatureis specified. -
userstring -
For a
text_embeddingtask, specify the user issuing the request. This information can be used for abuse detection.
Response
-
chunking_settingsInferenceChunkingSettings -
Chunking configuration object
-
max_chunk_sizenumber · default: 250 -
The maximum size of a chunk in words. This value cannot be higher than
300or lower than20(forsentencestrategy) or10(forwordstrategy). -
overlapnumber · default: 100 -
The number of overlapping words for chunks. It is applicable only to a
wordchunking strategy. This value cannot be higher than half themax_chunk_sizevalue. -
sentence_overlapnumber · default: 1 -
The number of overlapping sentences for chunks. It is applicable only for a
sentencechunking strategy. It can be either1or0. -
strategystring · default: sentence -
The chunking strategy:
sentenceorword. -
servicestringrequired -
The service type
-
service_settingsServiceSettingsrequired -
Settings specific to the service
-
task_settingsTaskSettings -
Task settings specific to the service and task type
-
inference_idstringrequired -
The inference Id