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 String
A description of what the function does.final String
name()
Required - The name of the function.static CompletionToolFunction
final JsonData
The parameters the functional accepts.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 Boolean
strict()
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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupCompletionToolFunctionDeserializer
protected static void setupCompletionToolFunctionDeserializer(ObjectDeserializer<CompletionToolFunction.Builder> op)
-