Class ContextualAIServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.ContextualAIServiceSettings
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class ContextualAIServiceSettings
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<ContextualAIServiceSettings>Json deserializer forContextualAIServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()Required - A valid API key for your Contexutual AI account.final StringmodelId()Required - The name of the model to use for the inference task.static ContextualAIServiceSettingsfinal RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from Contextual AI.rebuild()voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupContextualAIServiceSettingsDeserializer(ObjectDeserializer<ContextualAIServiceSettings.Builder> op) toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forContextualAIServiceSettings
-
-
Method Details
-
of
-
apiKey
Required - A valid API key for your Contexutual AI 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.
API name:
api_key -
modelId
Required - The name of the model to use for the inference task. Refer to the Contextual AI documentation for the list of available rerank models.API name:
model_id -
rateLimit
This setting helps to minimize the number of rate limit errors returned from Contextual AI. Thecontextualaiservice sets a default number of requests allowed per minute depending on the task type. Forrerank, it is set to1000.API name:
rate_limit -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
ContextualAIServiceSettings.Builderinitialized with field values of this instance
-
setupContextualAIServiceSettingsDeserializer
protected static void setupContextualAIServiceSettingsDeserializer(ObjectDeserializer<ContextualAIServiceSettings.Builder> op)
-