Class ChatCompletionStoreMessage.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionStoreMessage.Builder
A builder for ChatCompletionStoreMessage.
-
-
Method Summary
-
-
Method Detail
-
content
final ChatCompletionStoreMessage.Builder content(String content)
The contents of the message.
-
content
final ChatCompletionStoreMessage.Builder content(Optional<String> content)
Alias for calling Builder.content with
content.orElse(null)
.
-
content
final ChatCompletionStoreMessage.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.
-
refusal
final ChatCompletionStoreMessage.Builder refusal(String refusal)
The refusal message generated by the model.
-
refusal
final ChatCompletionStoreMessage.Builder refusal(Optional<String> refusal)
Alias for calling Builder.refusal with
refusal.orElse(null)
.
-
refusal
final ChatCompletionStoreMessage.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 ChatCompletionStoreMessage.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.
-
annotations
final ChatCompletionStoreMessage.Builder annotations(List<ChatCompletionMessage.Annotation> annotations)
Annotations for the message, when applicable, as when using the web search tool.
-
annotations
final ChatCompletionStoreMessage.Builder annotations(JsonField<List<ChatCompletionMessage.Annotation>> annotations)
Sets Builder.annotations to an arbitrary JSON value.
You should usually call Builder.annotations with a well-typed
List<ChatCompletionMessage.Annotation>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addAnnotation
final ChatCompletionStoreMessage.Builder addAnnotation(ChatCompletionMessage.Annotation annotation)
Adds a single ChatCompletionMessage.Annotation to annotations.
-
audio
final ChatCompletionStoreMessage.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 ChatCompletionStoreMessage.Builder audio(Optional<ChatCompletionAudio> audio)
Alias for calling Builder.audio with
audio.orElse(null)
.
-
audio
final ChatCompletionStoreMessage.Builder audio(JsonField<ChatCompletionAudio> audio)
Sets Builder.audio to an arbitrary JSON value.
You should usually call Builder.audio with a well-typed ChatCompletionAudio value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
functionCall
@Deprecated(message = "deprecated") final ChatCompletionStoreMessage.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 ChatCompletionStoreMessage.Builder functionCall(JsonField<ChatCompletionMessage.FunctionCall> functionCall)
Sets Builder.functionCall to an arbitrary JSON value.
You should usually call Builder.functionCall with a well-typed ChatCompletionMessage.FunctionCall value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolCalls
final ChatCompletionStoreMessage.Builder toolCalls(List<ChatCompletionMessageToolCall> toolCalls)
The tool calls generated by the model, such as function calls.
-
toolCalls
final ChatCompletionStoreMessage.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 ChatCompletionStoreMessage.Builder addToolCall(ChatCompletionMessageToolCall toolCall)
Adds a single ChatCompletionMessageToolCall to toolCalls.
-
id
final ChatCompletionStoreMessage.Builder id(String id)
The identifier of the chat message.
-
id
final ChatCompletionStoreMessage.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ChatCompletionStoreMessage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionStoreMessage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionStoreMessage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionStoreMessage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionStoreMessage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionStoreMessage build()
Returns an immutable instance of ChatCompletionStoreMessage.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.content() .refusal() .id()
-
-
-
-