Class Ai21ServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.Ai21ServiceSettings
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<Ai21ServiceSettings>Json deserializer forAi21ServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()A valid API key for accessing AI21 API.final StringmodelId()Required - The name of the model to use for the inference task.static Ai21ServiceSettingsfinal RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from the AI21 API.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()
-
Field Details
-
_DESERIALIZER
Json deserializer forAi21ServiceSettings
-
-
Method Details
-
of
public static Ai21ServiceSettings of(Function<Ai21ServiceSettings.Builder, ObjectBuilder<Ai21ServiceSettings>> fn) -
modelId
Required - The name of the model to use for the inference task. Refer to the AI21 models documentation for the list of supported models and versions. Service has been tested and confirmed to be working forcompletionandchat_completiontasks with the following models:jamba-minijamba-large
API name:
model_id -
apiKey
A valid API key for accessing AI21 API.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 -
rateLimit
This setting helps to minimize the number of rate limit errors returned from the AI21 API. By default, theai21service sets the number of requests allowed per minute to 200. Please refer to AI21 documentation for more details.API name:
rate_limit -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupAi21ServiceSettingsDeserializer
protected static void setupAi21ServiceSettingsDeserializer(ObjectDeserializer<Ai21ServiceSettings.Builder> op)
-