specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts (27 lines of code) (raw):
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import {
AzureOpenAIServiceSettings,
AzureOpenAIServiceType,
AzureOpenAITaskSettings,
AzureOpenAITaskType
} from '@inference/_types/CommonTypes'
import { InferenceChunkingSettings } from '@inference/_types/Services'
import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'
/**
* Create an Azure OpenAI inference endpoint.
*
* Create an inference endpoint to perform an inference task with the `azureopenai` service.
*
* The list of chat completion models that you can choose from in your Azure OpenAI deployment include:
*
* * [GPT-4 and GPT-4 Turbo models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models)
* * [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35)
*
* The list of embeddings models that you can choose from in your deployment can be found in the [Azure models documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings).
* @rest_spec_name inference.put_azureopenai
* @availability stack since=8.14.0 stability=stable visibility=public
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_inference
* @doc_id inference-api-put-azureopenai
*/
export interface Request extends RequestBase {
urls: [
{
path: '/_inference/{task_type}/{azureopenai_inference_id}'
methods: ['PUT']
}
]
path_parts: {
/**
* The type of the inference task that the model will perform.
* NOTE: The `chat_completion` task type only supports streaming and only through the _stream API.
*/
task_type: AzureOpenAITaskType
/**
* The unique identifier of the inference endpoint.
*/
azureopenai_inference_id: Id
}
body: {
/**
* The chunking configuration object.
* @ext_doc_id inference-chunking
*/
chunking_settings?: InferenceChunkingSettings
/**
* The type of service supported for the specified task type. In this case, `azureopenai`.
*/
service: AzureOpenAIServiceType
/**
* Settings used to install the inference model. These settings are specific to the `azureopenai` service.
*/
service_settings: AzureOpenAIServiceSettings
/**
* Settings to configure the inference task.
* These settings are specific to the task type you specified.
*/
task_settings?: AzureOpenAITaskSettings
}
}