Constructs a new sequence with the given source file and optional initial segments. If initial segments are provided, they are added to the sequence in order.
{string} The source file of the sequence
{ChatSegment[]} An optional set of initial segments to add to the sequence
Readonly
idThe unique identifier of the sequence.
Readonly
sourceThe source file of the sequence.
The metadata of the sequence. A copy is returned to prevent direct modification of the internal metadata object.
The metadata of the sequence
Gets the segments of the sequence. A copy is returned to prevent direct modification of the internal segments array.
A copy of the segments in the sequence
The total number of segments in the sequence
The total number of segments in the sequence
Adds segments to the sequence, maintaining order by startIndex
The segments to add to the sequence
Finds segments containing specific keywords
{string[]} The keywords to search for
Finds segments by participant
{string} The participant to search for
The segments containing the specified participant
Gets a segment by its index in the sequence
The index of the segment to get
The segment at the given index, or undefined if the index is out of range
Creates a new sequence with updated segments
The updated segments for the new sequence
A new sequence with the updated segments
Represents a chat sequence, which consists of segments and metadata, providing methods for accessing and modifying them.
ChatSequenceImpl