Class CustomServiceSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.CustomServiceSettings
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<CustomServiceSettings>Json deserializer forCustomServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal JsonDataheaders()Specifies the HTTP header parameters – such asAuthenticationorContent-Type– that are required to access the custom service.final JsonDataSpecifies the input type translation values that are used to replace the${input_type}template in the request body.static CustomServiceSettingsfinal JsonDataSpecifies the query parameters as a list of tuples.final CustomRequestParamsrequest()Required - The request configuration object.final CustomResponseParamsresponse()Required - The response configuration object.final JsonDataRequired - Specifies secret parameters, likeapi_keyorapi_token, that are required to access the custom service.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()final Stringurl()The URL endpoint to use for the requests.
-
Field Details
-
_DESERIALIZER
Json deserializer forCustomServiceSettings
-
-
Method Details
-
of
public static CustomServiceSettings of(Function<CustomServiceSettings.Builder, ObjectBuilder<CustomServiceSettings>> fn) -
headers
Specifies the HTTP header parameters – such asAuthenticationorContent-Type– that are required to access the custom service. For example:"headers":{ "Authorization": "Bearer ${api_key}", "Content-Type": "application/json;charset=utf-8" }API name:
headers -
inputType
Specifies the input type translation values that are used to replace the${input_type}template in the request body. For example:"input_type": { "translation": { "ingest": "do_ingest", "search": "do_search" }, "default": "a_default" },If the subsequent inference requests come from a search context, the
searchkey will be used and the template will be replaced withdo_search. If it comes from the ingest contextdo_ingestis used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used.translationcan be:classificationclusteringingestsearch
API name:
input_type -
queryParameters
Specifies the query parameters as a list of tuples. The arrays inside thequery_parametersmust have two items, a key and a value. For example:"query_parameters":[ ["param_key", "some_value"], ["param_key", "another_value"], ["other_key", "other_value"] ]If the base url is
https://www.elastic.coit results in:https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value.API name:
query_parameters -
request
Required - The request configuration object.API name:
request -
response
Required - The response configuration object.API name:
response -
secretParameters
Required - Specifies secret parameters, likeapi_keyorapi_token, that are required to access the custom service. For example:"secret_parameters":{ "api_key":"<api_key>" }API name:
secret_parameters -
url
The URL endpoint to use for the requests.API name:
url -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupCustomServiceSettingsDeserializer
protected static void setupCustomServiceSettingsDeserializer(ObjectDeserializer<CustomServiceSettings.Builder> op)
-