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 JsonData
headers()
Specifies the HTTPS header parameters – such asAuthentication
orContet-Type
– that are required to access the custom service.final JsonData
Specifies the input type translation values that are used to replace the${input_type}
template in the request body.static CustomServiceSettings
final JsonData
Specifies the query parameters as a list of tuples.final CustomRequestParams
request()
Required - The request configuration object.final CustomResponseParams
response()
Required - The response configuration object.final JsonData
Required - Specifies secret parameters, likeapi_key
orapi_token
, that are required to access the custom service.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
toString()
final String
url()
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 HTTPS header parameters – such asAuthentication
orContet-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
search
key will be used and the template will be replaced withdo_search
. If it comes from the ingest contextdo_ingest
is 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.translation
can be:classification
clustering
ingest
search
API name:
input_type
-
queryParameters
Specifies the query parameters as a list of tuples. The arrays inside thequery_parameters
must 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.co
it 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_key
orapi_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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupCustomServiceSettingsDeserializer
protected static void setupCustomServiceSettingsDeserializer(ObjectDeserializer<CustomServiceSettings.Builder> op)
-