Class HuggingFaceServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.HuggingFaceServiceSettings
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class HuggingFaceServiceSettings
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<HuggingFaceServiceSettings>Json deserializer forHuggingFaceServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()Required - A valid access token for your HuggingFace account.static HuggingFaceServiceSettingsfinal RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from Hugging Face.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupHuggingFaceServiceSettingsDeserializer(ObjectDeserializer<HuggingFaceServiceSettings.Builder> op) toString()final Stringurl()Required - The URL endpoint to use for the requests.
-
Field Details
-
_DESERIALIZER
Json deserializer forHuggingFaceServiceSettings
-
-
Method Details
-
of
public static HuggingFaceServiceSettings of(Function<HuggingFaceServiceSettings.Builder, ObjectBuilder<HuggingFaceServiceSettings>> fn) -
apiKey
Required - A valid access token for your HuggingFace account. You can create or find your access tokens on the HuggingFace settings page.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 Hugging Face. By default, thehugging_faceservice sets the number of requests allowed per minute to 3000.API name:
rate_limit -
url
Required - The URL endpoint to use for the requests.API name:
url -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupHuggingFaceServiceSettingsDeserializer
protected static void setupHuggingFaceServiceSettingsDeserializer(ObjectDeserializer<HuggingFaceServiceSettings.Builder> op)
-