Creates a new data model manager with the given options. The options can include a maximum file size, a chunk size for parsing, and a timeout for parsing.
Optional
options: DataModelOptions = {}Options for the data model manager.
Adds a chat segment to the data model. Currently, this method is not implemented and will throw an error. #TODO: Implement this method
The segment to add.
Adds a chat sequence to the data model. Currently, this method is not implemented and will throw an error. #TODO: Implement this method
The sequence to add.
Gets all segments across all sequences
An array of all segments.
Gets all sequences
An array of all sequences.
Gets the next segment in sequence
The ID of the current segment.
The next segment in the sequence, or undefined if the current segment is the last.
Gets the previous segment in sequence
The ID of the current segment.
The previous segment in the sequence, or undefined if the current segment is the first.
Gets a segment by ID
The ID of the segment to retrieve.
The segment with the given ID, or undefined if not found.
Gets a sequence by ID
The ID of the sequence to retrieve.
The sequence with the given ID, or undefined if not found.
Gets all segments for a sequence
The ID of the sequence.
An array of all segments for the sequence.
Subscribes to data model events
The type of event to subscribe to.
The listener function to be called when the event occurs.
Processes a log file and creates a chat sequence
The path to the log file.
A promise that resolves to the created chat sequence.
Processes a segment, adding it to the data model and emitting events.
The segment to process.
Updates a segment's boundaries
The ID of the segment to update.
The new start index of the segment.
The new end index of the segment.
A promise that resolves when the segment boundaries have been updated.
Data Model Manager
DataModelManager