Class ThreadCreateParams.Message.Builder
- 
                    
                    
- All Implemented Interfaces:
 
public final class ThreadCreateParams.Message.BuilderA builder for Message.
 
- 
                
                    
                    
- 
                                
                            
                                
Method Summary
- 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
content
final ThreadCreateParams.Message.Builder content(ThreadCreateParams.Message.Content content)
The text contents of the message.
 
- 
                                        
content
final ThreadCreateParams.Message.Builder content(JsonField<ThreadCreateParams.Message.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 ThreadCreateParams.Message.Builder content(String text)
Alias for calling content with
Content.ofText(text). 
- 
                                        
contentOfArrayOfContentParts
final ThreadCreateParams.Message.Builder contentOfArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)
Alias for calling content with
Content.ofArrayOfContentParts(arrayOfContentParts). 
- 
                                        
role
final ThreadCreateParams.Message.Builder role(ThreadCreateParams.Message.Role role)
The role of the entity that is creating the message. Allowed values include:
user: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.assistant: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
 
- 
                                        
role
final ThreadCreateParams.Message.Builder role(JsonField<ThreadCreateParams.Message.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.
 
- 
                                        
attachments
final ThreadCreateParams.Message.Builder attachments(List<ThreadCreateParams.Message.Attachment> attachments)
A list of files attached to the message, and the tools they should be added to.
 
- 
                                        
attachments
final ThreadCreateParams.Message.Builder attachments(Optional<List<ThreadCreateParams.Message.Attachment>> attachments)
Alias for calling Builder.attachments with
attachments.orElse(null). 
- 
                                        
attachments
final ThreadCreateParams.Message.Builder attachments(JsonField<List<ThreadCreateParams.Message.Attachment>> attachments)
Sets Builder.attachments to an arbitrary JSON value.
You should usually call Builder.attachments with a well-typed
List<Attachment>value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
- 
                                        
addAttachment
final ThreadCreateParams.Message.Builder addAttachment(ThreadCreateParams.Message.Attachment attachment)
Adds a single Attachment to attachments.
 
- 
                                        
metadata
final ThreadCreateParams.Message.Builder metadata(ThreadCreateParams.Message.Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
 
- 
                                        
metadata
final ThreadCreateParams.Message.Builder metadata(Optional<ThreadCreateParams.Message.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null). 
- 
                                        
metadata
final ThreadCreateParams.Message.Builder metadata(JsonField<ThreadCreateParams.Message.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
additionalProperties
final ThreadCreateParams.Message.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
 
- 
                                        
putAdditionalProperty
final ThreadCreateParams.Message.Builder putAdditionalProperty(String key, JsonValue value)
 
- 
                                        
putAllAdditionalProperties
final ThreadCreateParams.Message.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
 
- 
                                        
removeAdditionalProperty
final ThreadCreateParams.Message.Builder removeAdditionalProperty(String key)
 
- 
                                        
removeAllAdditionalProperties
final ThreadCreateParams.Message.Builder removeAllAdditionalProperties(Set<String> keys)
 
- 
                                        
build
final ThreadCreateParams.Message build()
Returns an immutable instance of Message.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.content() .role() 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -