Class ChatCompletionMessage.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionMessage.Builder
A builder for ChatCompletionMessage.
-
-
Method Summary
Modifier and Type Method Description final ChatCompletionMessage.Builder
content(String content)
The contents of the message. final ChatCompletionMessage.Builder
content(Optional<String> content)
The contents of the message. final ChatCompletionMessage.Builder
content(JsonField<String> content)
The contents of the message. final ChatCompletionMessage.Builder
refusal(String refusal)
The refusal message generated by the model. final ChatCompletionMessage.Builder
refusal(Optional<String> refusal)
The refusal message generated by the model. final ChatCompletionMessage.Builder
refusal(JsonField<String> refusal)
The refusal message generated by the model. final ChatCompletionMessage.Builder
role(JsonValue role)
The role of the author of this message. final ChatCompletionMessage.Builder
audio(ChatCompletionAudio audio)
If the audio output modality is requested, this object contains data about the audio response from the model. 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. 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. final ChatCompletionMessage.Builder
functionCall(ChatCompletionMessage.FunctionCall functionCall)
Deprecated and replaced by tool_calls
.final ChatCompletionMessage.Builder
functionCall(JsonField<ChatCompletionMessage.FunctionCall> functionCall)
Deprecated and replaced by tool_calls
.final ChatCompletionMessage.Builder
toolCalls(List<ChatCompletionMessageToolCall> toolCalls)
The tool calls generated by the model, such as function calls. final ChatCompletionMessage.Builder
toolCalls(JsonField<List<ChatCompletionMessageToolCall>> toolCalls)
The tool calls generated by the model, such as function calls. final ChatCompletionMessage.Builder
addToolCall(ChatCompletionMessageToolCall toolCall)
The tool calls generated by the model, such as function calls. final ChatCompletionMessage.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final ChatCompletionMessage.Builder
putAdditionalProperty(String key, JsonValue value)
final ChatCompletionMessage.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final ChatCompletionMessage.Builder
removeAdditionalProperty(String key)
final ChatCompletionMessage.Builder
removeAllAdditionalProperties(Set<String> keys)
final ChatCompletionMessage
build()
-
-
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()
-
-
-
-