Class OpenShiftAiServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.OpenShiftAiServiceSettings
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class OpenShiftAiServiceSettings
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<OpenShiftAiServiceSettings>Json deserializer forOpenShiftAiServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()Required - A valid API key for your OpenShift AI endpoint.final IntegerFor atext_embeddingtask, the maximum number of tokens per input before chunking occurs.final StringmodelId()The name of the model to use for the inference task.static OpenShiftAiServiceSettingsfinal RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from the OpenShift AI API.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 voidsetupOpenShiftAiServiceSettingsDeserializer(ObjectDeserializer<OpenShiftAiServiceSettings.Builder> op) For atext_embeddingtask, the similarity measure.toString()final Stringurl()Required - The URL of the OpenShift AI hosted model endpoint.
-
Field Details
-
_DESERIALIZER
Json deserializer forOpenShiftAiServiceSettings
-
-
Method Details
-
of
public static OpenShiftAiServiceSettings of(Function<OpenShiftAiServiceSettings.Builder, ObjectBuilder<OpenShiftAiServiceSettings>> fn) -
apiKey
Required - A valid API key for your OpenShift AI endpoint. Can be found inToken authenticationsection of model related information.API name:
api_key -
url
Required - The URL of the OpenShift AI hosted model endpoint.API name:
url -
modelId
The name of the model to use for the inference task. Refer to the hosted model's documentation for the name if needed. Service has been tested and confirmed to be working with the following models:- For
text_embeddingtask -gritlm-7b. - For
completionandchat_completiontasks -llama-31-8b-instruct. - For
reranktask -bge-reranker-v2-m3.
API name:
model_id - For
-
maxInputTokens
For atext_embeddingtask, the maximum number of tokens per input before chunking occurs.API name:
max_input_tokens -
similarity
For atext_embeddingtask, the similarity measure. One of cosine, dot_product, l2_norm. If not specified, the default dot_product value is used.API name:
similarity -
rateLimit
This setting helps to minimize the number of rate limit errors returned from the OpenShift AI API. By default, theopenshift_aiservice sets the number of requests allowed per minute to 3000.API name:
rate_limit -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
OpenShiftAiServiceSettings.Builderinitialized with field values of this instance
-
setupOpenShiftAiServiceSettingsDeserializer
protected static void setupOpenShiftAiServiceSettingsDeserializer(ObjectDeserializer<OpenShiftAiServiceSettings.Builder> op)
-