Class AzureOpenAIServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.AzureOpenAIServiceSettings
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class AzureOpenAIServiceSettings
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<AzureOpenAIServiceSettings>Json deserializer forAzureOpenAIServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()A valid API key for your Azure OpenAI account.final StringRequired - The Azure API version ID to use.final StringRequired - The deployment name of your deployed models.final StringentraId()A valid Microsoft Entra token.static AzureOpenAIServiceSettingsfinal RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from Azure.final StringRequired - The name of your Azure OpenAI resource.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupAzureOpenAIServiceSettingsDeserializer(ObjectDeserializer<AzureOpenAIServiceSettings.Builder> op) toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forAzureOpenAIServiceSettings
-
-
Method Details
-
of
public static AzureOpenAIServiceSettings of(Function<AzureOpenAIServiceSettings.Builder, ObjectBuilder<AzureOpenAIServiceSettings>> fn) -
apiKey
A valid API key for your Azure OpenAI account. You must specify eitherapi_keyorentra_id. If you do not provide either or you provide both, you will receive an error when you try to create your model.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. After creating the inference model, you cannot change the associated API key. If you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.
API name:
api_key -
apiVersion
Required - The Azure API version ID to use. It is recommended to use the latest supported non-preview version.API name:
api_version -
deploymentId
Required - The deployment name of your deployed models. Your Azure OpenAI deployments can be found though the Azure OpenAI Studio portal that is linked to your subscription.API name:
deployment_id -
entraId
A valid Microsoft Entra token. You must specify eitherapi_keyorentra_id. If you do not provide either or you provide both, you will receive an error when you try to create your model.API name:
entra_id -
rateLimit
This setting helps to minimize the number of rate limit errors returned from Azure. Theazureopenaiservice sets a default number of requests allowed per minute depending on the task type. Fortext_embedding, it is set to1440. Forcompletion, it is set to120.API name:
rate_limit -
resourceName
Required - The name of your Azure OpenAI resource. You can find this from the list of resources in the Azure Portal for your subscription.API name:
resource_name -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupAzureOpenAIServiceSettingsDeserializer
protected static void setupAzureOpenAIServiceSettingsDeserializer(ObjectDeserializer<AzureOpenAIServiceSettings.Builder> op)
-