Class CompletionToolFunction
java.lang.Object
co.elastic.clients.elasticsearch.inference.CompletionToolFunction
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class CompletionToolFunction
extends Object
implements JsonpSerializable
The completion tool function definition.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<CompletionToolFunction>Json deserializer forCompletionToolFunction -
Method Summary
Modifier and TypeMethodDescriptionfinal StringA description of what the function does.final Stringname()Required - The name of the function.static CompletionToolFunctionfinal JsonDataThe parameters the functional accepts.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 Booleanstrict()Whether to enable schema adherence when generating the function call.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forCompletionToolFunction
-
-
Method Details
-
of
public static CompletionToolFunction of(Function<CompletionToolFunction.Builder, ObjectBuilder<CompletionToolFunction>> fn) -
description
A description of what the function does. This is used by the model to choose when and how to call the function.API name:
description -
name
Required - The name of the function.API name:
name -
parameters
The parameters the functional accepts. This should be formatted as a JSON object.API name:
parameters -
strict
Whether to enable schema adherence when generating the function call.API name:
strict -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupCompletionToolFunctionDeserializer
protected static void setupCompletionToolFunctionDeserializer(ObjectDeserializer<CompletionToolFunction.Builder> op)
-