Class Message.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<Message.Builder>
co.elastic.clients.elasticsearch.inference.Message.Builder
- All Implemented Interfaces:
WithJson<Message.Builder>
,ObjectBuilder<Message>
- Enclosing class:
- Message
public static class Message.Builder
extends WithJsonObjectBuilderBase<Message.Builder>
implements ObjectBuilder<Message>
Builder for
Message
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aMessage
.final Message.Builder
content
(MessageContent value) The content of the message.final Message.Builder
The content of the message.final Message.Builder
Required - The role of the message author.protected Message.Builder
self()
final Message.Builder
toolCallId
(String value) The tool call that this message is responding to.final Message.Builder
The tool calls generated by the model.final Message.Builder
The tool calls generated by the model.final Message.Builder
The tool calls generated by the model.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
-
content
The content of the message.API name:
content
-
content
public final Message.Builder content(Function<MessageContent.Builder, ObjectBuilder<MessageContent>> fn) The content of the message.API name:
content
-
role
Required - The role of the message author.API name:
role
-
toolCallId
The tool call that this message is responding to.API name:
tool_call_id
-
toolCalls
The tool calls generated by the model.API name:
tool_calls
Adds all elements of
list
totoolCalls
. -
toolCalls
The tool calls generated by the model.API name:
tool_calls
Adds one or more values to
toolCalls
. -
toolCalls
The tool calls generated by the model.API name:
tool_calls
Adds a value to
toolCalls
using a builder lambda. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<Message.Builder>
-
build
Builds aMessage
.- Specified by:
build
in interfaceObjectBuilder<Message>
- Throws:
NullPointerException
- if some of the required fields are null.
-