Class ChatCompletionMessage.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionMessage.Builder
-
-
Constructor Summary
Constructors Constructor Description ChatCompletionMessage.Builder()
-
Method Summary
Modifier and Type Method Description final ChatCompletionMessage.Buildercontent(String content)The contents of the message. final ChatCompletionMessage.Buildercontent(Optional<String> content)The contents of the message. final ChatCompletionMessage.Buildercontent(JsonField<String> content)The contents of the message. final ChatCompletionMessage.Builderrefusal(String refusal)The refusal message generated by the model. final ChatCompletionMessage.Builderrefusal(Optional<String> refusal)The refusal message generated by the model. final ChatCompletionMessage.Builderrefusal(JsonField<String> refusal)The refusal message generated by the model. final ChatCompletionMessage.Builderrole(JsonValue role)The role of the author of this message. final ChatCompletionMessage.Builderaudio(ChatCompletionAudio audio)If the audio output modality is requested, this object contains data about the audio response from the model. final ChatCompletionMessage.Builderaudio(Optional<ChatCompletionAudio> audio)If the audio output modality is requested, this object contains data about the audio response from the model. final ChatCompletionMessage.Builderaudio(JsonField<ChatCompletionAudio> audio)If the audio output modality is requested, this object contains data about the audio response from the model. final ChatCompletionMessage.BuilderfunctionCall(ChatCompletionMessage.FunctionCall functionCall)Deprecated and replaced by tool_calls.final ChatCompletionMessage.BuilderfunctionCall(JsonField<ChatCompletionMessage.FunctionCall> functionCall)Deprecated and replaced by tool_calls.final ChatCompletionMessage.BuildertoolCalls(List<ChatCompletionMessageToolCall> toolCalls)The tool calls generated by the model, such as function calls. final ChatCompletionMessage.BuildertoolCalls(JsonField<List<ChatCompletionMessageToolCall>> toolCalls)The tool calls generated by the model, such as function calls. final ChatCompletionMessage.BuilderaddToolCall(ChatCompletionMessageToolCall toolCall)The tool calls generated by the model, such as function calls. final ChatCompletionMessage.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ChatCompletionMessage.BuilderputAdditionalProperty(String key, JsonValue value)final ChatCompletionMessage.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ChatCompletionMessage.BuilderremoveAdditionalProperty(String key)final ChatCompletionMessage.BuilderremoveAllAdditionalProperties(Set<String> keys)final ChatCompletionMessagebuild()-
-
Method Detail
-
content
final ChatCompletionMessage.Builder content(String content)
The contents of the message.
-
content
final ChatCompletionMessage.Builder content(Optional<String> content)
The contents of the message.
-
content
final ChatCompletionMessage.Builder content(JsonField<String> content)
The contents of the message.
-
refusal
final ChatCompletionMessage.Builder refusal(String refusal)
The refusal message generated by the model.
-
refusal
final ChatCompletionMessage.Builder refusal(Optional<String> refusal)
The refusal message generated by the model.
-
refusal
final ChatCompletionMessage.Builder refusal(JsonField<String> refusal)
The refusal message generated by the model.
-
role
final ChatCompletionMessage.Builder role(JsonValue role)
The role of the author of this message.
-
audio
final ChatCompletionMessage.Builder audio(ChatCompletionAudio audio)
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.
-
audio
final ChatCompletionMessage.Builder audio(Optional<ChatCompletionAudio> audio)
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.
-
audio
final ChatCompletionMessage.Builder audio(JsonField<ChatCompletionAudio> audio)
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.
-
functionCall
@Deprecated(message = "deprecated") final ChatCompletionMessage.Builder functionCall(ChatCompletionMessage.FunctionCall functionCall)
Deprecated and replaced by
tool_calls. The name and arguments of a function that should be called, as generated by the model.
-
functionCall
@Deprecated(message = "deprecated") final ChatCompletionMessage.Builder functionCall(JsonField<ChatCompletionMessage.FunctionCall> functionCall)
Deprecated and replaced by
tool_calls. The name and arguments of a function that should be called, as generated by the model.
-
toolCalls
final ChatCompletionMessage.Builder toolCalls(List<ChatCompletionMessageToolCall> toolCalls)
The tool calls generated by the model, such as function calls.
-
toolCalls
final ChatCompletionMessage.Builder toolCalls(JsonField<List<ChatCompletionMessageToolCall>> toolCalls)
The tool calls generated by the model, such as function calls.
-
addToolCall
final ChatCompletionMessage.Builder addToolCall(ChatCompletionMessageToolCall toolCall)
The tool calls generated by the model, such as function calls.
-
additionalProperties
final ChatCompletionMessage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionMessage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionMessage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionMessage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionMessage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionMessage build()
-
-
-
-