Record Class ThreadMessage
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.ThreadMessage
- All Implemented Interfaces:
AssistantStreamEvent.Data
public record ThreadMessage(String id, long createdAt, String threadId, String status, ThreadMessage.IncompleteDetails incompleteDetails, Long completedAt, Long incompleteAt, String role, List<ThreadMessage.Content> content, String assistantId, String runId, List<Attachment> attachments, Map<String,String> metadata)
extends Record
implements AssistantStreamEvent.Data
Represents a message within a thread.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static final record
On an incomplete message, details about why the message is incomplete. -
Constructor Summary
ConstructorsConstructorDescriptionThreadMessage
(String id, long createdAt, String threadId, String status, ThreadMessage.IncompleteDetails incompleteDetails, Long completedAt, Long incompleteAt, String role, List<ThreadMessage.Content> content, String assistantId, String runId, List<Attachment> attachments, Map<String, String> metadata) Creates an instance of aThreadMessage
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassistantId
record component.Returns the value of theattachments
record component.Returns the value of thecompletedAt
record component.content()
Returns the value of thecontent
record component.long
Returns the value of thecreatedAt
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theincompleteAt
record component.Returns the value of theincompleteDetails
record component.metadata()
Returns the value of themetadata
record component.role()
Returns the value of therole
record component.runId()
Returns the value of therunId
record component.status()
Returns the value of thestatus
record component.threadId()
Returns the value of thethreadId
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ThreadMessage
public ThreadMessage(String id, long createdAt, String threadId, String status, ThreadMessage.IncompleteDetails incompleteDetails, Long completedAt, Long incompleteAt, String role, List<ThreadMessage.Content> content, String assistantId, String runId, List<Attachment> attachments, Map<String, String> metadata) Creates an instance of aThreadMessage
record class.- Parameters:
id
- the value for theid
record componentcreatedAt
- the value for thecreatedAt
record componentthreadId
- the value for thethreadId
record componentstatus
- the value for thestatus
record componentincompleteDetails
- the value for theincompleteDetails
record componentcompletedAt
- the value for thecompletedAt
record componentincompleteAt
- the value for theincompleteAt
record componentrole
- the value for therole
record componentcontent
- the value for thecontent
record componentassistantId
- the value for theassistantId
record componentrunId
- the value for therunId
record componentattachments
- the value for theattachments
record componentmetadata
- the value for themetadata
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
createdAt
public long createdAt()Returns the value of thecreatedAt
record component.- Returns:
- the value of the
createdAt
record component
-
threadId
Returns the value of thethreadId
record component.- Returns:
- the value of the
threadId
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
incompleteDetails
Returns the value of theincompleteDetails
record component.- Returns:
- the value of the
incompleteDetails
record component
-
completedAt
Returns the value of thecompletedAt
record component.- Returns:
- the value of the
completedAt
record component
-
incompleteAt
Returns the value of theincompleteAt
record component.- Returns:
- the value of the
incompleteAt
record component
-
role
Returns the value of therole
record component.- Returns:
- the value of the
role
record component
-
content
Returns the value of thecontent
record component.- Returns:
- the value of the
content
record component
-
assistantId
Returns the value of theassistantId
record component.- Returns:
- the value of the
assistantId
record component
-
runId
Returns the value of therunId
record component.- Returns:
- the value of the
runId
record component
-
attachments
Returns the value of theattachments
record component.- Returns:
- the value of the
attachments
record component
-
metadata
Returns the value of themetadata
record component.- Returns:
- the value of the
metadata
record component
-