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.Builder
function
(ToolCallFunction value) Required - The function that the model called.final ToolCall.Builder
Required - The function that the model called.final ToolCall.Builder
Required - The identifier of the tool call.protected ToolCall.Builder
self()
final ToolCall.Builder
Required - The type of the tool call.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods 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:
self
in classWithJsonObjectBuilderBase<ToolCall.Builder>
-
build
Builds aToolCall
.- Specified by:
build
in interfaceObjectBuilder<ToolCall>
- Throws:
NullPointerException
- if some of the required fields are null.
-