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.Buildercontent(MessageContent value) The content of the message.final Message.BuilderThe content of the message.final Message.BuilderRequired - The role of the message author.protected Message.Builderself()final Message.BuildertoolCallId(String value) The tool call that this message is responding to.final Message.BuilderThe tool calls generated by the model.final Message.BuilderThe tool calls generated by the model.final Message.BuilderThe tool calls generated by the model.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
-
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_callsAdds all elements of
listtotoolCalls. -
toolCalls
The tool calls generated by the model.API name:
tool_callsAdds one or more values to
toolCalls. -
toolCalls
The tool calls generated by the model.API name:
tool_callsAdds a value to
toolCallsusing a builder lambda. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<Message.Builder>
-
build
Builds aMessage.- Specified by:
buildin interfaceObjectBuilder<Message>- Throws:
NullPointerException- if some of the required fields are null.
-