Class CompletionToolFunction.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<CompletionToolFunction.Builder>
co.elastic.clients.elasticsearch.inference.CompletionToolFunction.Builder
- All Implemented Interfaces:
WithJson<CompletionToolFunction.Builder>,ObjectBuilder<CompletionToolFunction>
- Enclosing class:
- CompletionToolFunction
public static class CompletionToolFunction.Builder
extends WithJsonObjectBuilderBase<CompletionToolFunction.Builder>
implements ObjectBuilder<CompletionToolFunction>
Builder for
CompletionToolFunction.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aCompletionToolFunction.description(String value) A description of what the function does.Required - The name of the function.parameters(JsonData value) The parameters the functional accepts.protected CompletionToolFunction.Builderself()Whether to enable schema adherence when generating the function call.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<CompletionToolFunction.Builder>
-
build
Builds aCompletionToolFunction.- Specified by:
buildin interfaceObjectBuilder<CompletionToolFunction>- Throws:
NullPointerException- if some of the required fields are null.
-