Class ToolCall.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ToolCall.Builder>
co.elastic.clients.elasticsearch.inference.ToolCall.Builder
- All Implemented Interfaces:
WithJson<ToolCall.Builder>,ObjectBuilder<ToolCall>
- Enclosing class:
- ToolCall
public static class ToolCall.Builder
extends WithJsonObjectBuilderBase<ToolCall.Builder>
implements ObjectBuilder<ToolCall>
Builder for
ToolCall.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aToolCall.final ToolCall.Builderfunction(ToolCallFunction value) Required - The function that the model called.final ToolCall.BuilderRequired - The function that the model called.final ToolCall.BuilderRequired - The identifier of the tool call.protected ToolCall.Builderself()final ToolCall.BuilderRequired - The type of the tool 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
-
id
Required - The identifier of the tool call.API name:
id -
function
Required - The function that the model called.API name:
function -
function
public final ToolCall.Builder function(Function<ToolCallFunction.Builder, ObjectBuilder<ToolCallFunction>> fn) Required - The function that the model called.API name:
function -
type
Required - The type of the tool call.API name:
type -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ToolCall.Builder>
-
build
Builds aToolCall.- Specified by:
buildin interfaceObjectBuilder<ToolCall>- Throws:
NullPointerException- if some of the required fields are null.
-