Class JinaAIServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.JinaAIServiceSettings
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<JinaAIServiceSettings>Json deserializer forJinaAIServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()Required - A valid API key of your JinaAI account.final IntegerFor atext_embeddingtask, the number of dimensions the resulting output embeddings should have.final JinaAIElementTypeFor atext_embeddingtask, the data type returned by the model.final StringmodelId()Required - The name of the model to use for the inference task.static JinaAIServiceSettingsfinal RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from JinaAI.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 voidfinal JinaAISimilarityTypeFor atext_embeddingtask, the similarity measure.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forJinaAIServiceSettings
-
-
Method Details
-
of
public static JinaAIServiceSettings of(Function<JinaAIServiceSettings.Builder, ObjectBuilder<JinaAIServiceSettings>> fn) -
apiKey
Required - A valid API key of your JinaAI 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.API name:
model_id -
rateLimit
This setting helps to minimize the number of rate limit errors returned from JinaAI. By default, thejinaaiservice sets the number of requests allowed per minute to 2000 for all task types.API name:
rate_limit -
similarity
For atext_embeddingtask, the similarity measure. One of cosine, dot_product, l2_norm. The default values varies with the embedding type. For example, a float embedding type uses adot_productsimilarity measure by default.API name:
similarity -
dimensions
For atext_embeddingtask, the number of dimensions the resulting output embeddings should have. By default, the model's standard output dimension is used. Refer to the Jina documentation for more information.API name:
dimensions -
elementType
For atext_embeddingtask, the data type returned by the model. Usebitfor binary embeddings, which are encoded as bytes with signed int8 precision. Usebinaryfor binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym ofbit). Usefloatfor the default float embeddings.API name:
element_type -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
JinaAIServiceSettings.Builderinitialized with field values of this instance
-
setupJinaAIServiceSettingsDeserializer
protected static void setupJinaAIServiceSettingsDeserializer(ObjectDeserializer<JinaAIServiceSettings.Builder> op)
-