Class ChatCompletionAssistantMessageParam.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionAssistantMessageParam.Builder
A builder for ChatCompletionAssistantMessageParam.
-
-
Method Summary
-
-
Method Detail
-
role
final ChatCompletionAssistantMessageParam.Builder role(JsonValue role)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("assistant")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
audio
final ChatCompletionAssistantMessageParam.Builder audio(ChatCompletionAssistantMessageParam.Audio audio)
Data about a previous audio response from the model. Learn more.
-
audio
final ChatCompletionAssistantMessageParam.Builder audio(Optional<ChatCompletionAssistantMessageParam.Audio> audio)
Alias for calling Builder.audio with
audio.orElse(null)
.
-
audio
final ChatCompletionAssistantMessageParam.Builder audio(JsonField<ChatCompletionAssistantMessageParam.Audio> audio)
Sets Builder.audio to an arbitrary JSON value.
You should usually call Builder.audio with a well-typed Audio value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
content
final ChatCompletionAssistantMessageParam.Builder content(ChatCompletionAssistantMessageParam.Content content)
The contents of the assistant message. Required unless
tool_calls
orfunction_call
is specified.
-
content
final ChatCompletionAssistantMessageParam.Builder content(Optional<ChatCompletionAssistantMessageParam.Content> content)
Alias for calling Builder.content with
content.orElse(null)
.
-
content
final ChatCompletionAssistantMessageParam.Builder content(JsonField<ChatCompletionAssistantMessageParam.Content> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed Content value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
content
final ChatCompletionAssistantMessageParam.Builder content(String text)
Alias for calling content with
Content.ofText(text)
.
-
contentOfArrayOfContentParts
final ChatCompletionAssistantMessageParam.Builder contentOfArrayOfContentParts(List<ChatCompletionAssistantMessageParam.Content.ChatCompletionRequestAssistantMessageContentPart> arrayOfContentParts)
Alias for calling content with
Content.ofArrayOfContentParts(arrayOfContentParts)
.
-
functionCall
@Deprecated(message = "deprecated") final ChatCompletionAssistantMessageParam.Builder functionCall(ChatCompletionAssistantMessageParam.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 ChatCompletionAssistantMessageParam.Builder functionCall(Optional<ChatCompletionAssistantMessageParam.FunctionCall> functionCall)
Alias for calling Builder.functionCall with
functionCall.orElse(null)
.
-
functionCall
@Deprecated(message = "deprecated") final ChatCompletionAssistantMessageParam.Builder functionCall(JsonField<ChatCompletionAssistantMessageParam.FunctionCall> functionCall)
Sets Builder.functionCall to an arbitrary JSON value.
You should usually call Builder.functionCall with a well-typed FunctionCall value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final ChatCompletionAssistantMessageParam.Builder name(String name)
An optional name for the participant. Provides the model information to differentiate between participants of the same role.
-
name
final ChatCompletionAssistantMessageParam.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
refusal
final ChatCompletionAssistantMessageParam.Builder refusal(String refusal)
The refusal message by the assistant.
-
refusal
final ChatCompletionAssistantMessageParam.Builder refusal(Optional<String> refusal)
Alias for calling Builder.refusal with
refusal.orElse(null)
.
-
refusal
final ChatCompletionAssistantMessageParam.Builder refusal(JsonField<String> refusal)
Sets Builder.refusal to an arbitrary JSON value.
You should usually call Builder.refusal with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolCalls
final ChatCompletionAssistantMessageParam.Builder toolCalls(List<ChatCompletionMessageToolCall> toolCalls)
The tool calls generated by the model, such as function calls.
-
toolCalls
final ChatCompletionAssistantMessageParam.Builder toolCalls(JsonField<List<ChatCompletionMessageToolCall>> toolCalls)
Sets Builder.toolCalls to an arbitrary JSON value.
You should usually call Builder.toolCalls with a well-typed
List<ChatCompletionMessageToolCall>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addToolCall
final ChatCompletionAssistantMessageParam.Builder addToolCall(ChatCompletionMessageToolCall toolCall)
Adds a single ChatCompletionMessageToolCall to toolCalls.
-
additionalProperties
final ChatCompletionAssistantMessageParam.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionAssistantMessageParam.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionAssistantMessageParam.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionAssistantMessageParam.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionAssistantMessageParam.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionAssistantMessageParam build()
Returns an immutable instance of ChatCompletionAssistantMessageParam.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-