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 String
apiKey()
Required - A valid API key of your JinaAI account.final String
modelId()
The name of the model to use for the inference task.static JinaAIServiceSettings
final RateLimitSetting
This setting helps to minimize the number of rate limit errors returned from JinaAI.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final JinaAISimilarityType
For atext_embedding
task, 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. 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
-
modelId
The name of the model to use for the inference task. For arerank
task, it is required. For atext_embedding
task, it is optional.API name:
model_id
-
rateLimit
This setting helps to minimize the number of rate limit errors returned from JinaAI. By default, thejinaai
service sets the number of requests allowed per minute to 2000 for all task types.API name:
rate_limit
-
similarity
For atext_embedding
task, 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_product
similarity measure by default.API name:
similarity
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupJinaAIServiceSettingsDeserializer
protected static void setupJinaAIServiceSettingsDeserializer(ObjectDeserializer<JinaAIServiceSettings.Builder> op)
-