Class ChatCompletionChunk.Choice.Delta.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionChunk.Choice.Delta.Builder
A builder for Delta.
-
-
Method Summary
-
-
Method Detail
-
content
final ChatCompletionChunk.Choice.Delta.Builder content(String content)
The contents of the chunk message.
-
content
final ChatCompletionChunk.Choice.Delta.Builder content(Optional<String> content)
Alias for calling Builder.content with
content.orElse(null)
.
-
content
final ChatCompletionChunk.Choice.Delta.Builder content(JsonField<String> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
functionCall
@Deprecated(message = "deprecated") final ChatCompletionChunk.Choice.Delta.Builder functionCall(ChatCompletionChunk.Choice.Delta.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 ChatCompletionChunk.Choice.Delta.Builder functionCall(JsonField<ChatCompletionChunk.Choice.Delta.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.
-
refusal
final ChatCompletionChunk.Choice.Delta.Builder refusal(String refusal)
The refusal message generated by the model.
-
refusal
final ChatCompletionChunk.Choice.Delta.Builder refusal(Optional<String> refusal)
Alias for calling Builder.refusal with
refusal.orElse(null)
.
-
refusal
final ChatCompletionChunk.Choice.Delta.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.
-
role
final ChatCompletionChunk.Choice.Delta.Builder role(ChatCompletionChunk.Choice.Delta.Role role)
The role of the author of this message.
-
role
final ChatCompletionChunk.Choice.Delta.Builder role(JsonField<ChatCompletionChunk.Choice.Delta.Role> role)
Sets Builder.role to an arbitrary JSON value.
You should usually call Builder.role with a well-typed Role value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolCalls
final ChatCompletionChunk.Choice.Delta.Builder toolCalls(List<ChatCompletionChunk.Choice.Delta.ToolCall> toolCalls)
-
toolCalls
final ChatCompletionChunk.Choice.Delta.Builder toolCalls(JsonField<List<ChatCompletionChunk.Choice.Delta.ToolCall>> toolCalls)
Sets Builder.toolCalls to an arbitrary JSON value.
You should usually call Builder.toolCalls with a well-typed
List<ToolCall>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addToolCall
final ChatCompletionChunk.Choice.Delta.Builder addToolCall(ChatCompletionChunk.Choice.Delta.ToolCall toolCall)
-
additionalProperties
final ChatCompletionChunk.Choice.Delta.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionChunk.Choice.Delta.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionChunk.Choice.Delta.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionChunk.Choice.Delta.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionChunk.Choice.Delta.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionChunk.Choice.Delta build()
Returns an immutable instance of Delta.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-