DocumentChunk

org.llm4s.chunking.DocumentChunk
final case class DocumentChunk(content: String, index: Int, metadata: ChunkMetadata)

A chunk of a document with metadata.

Value parameters

content

The chunk text

index

Position in original document (0-indexed)

metadata

Preserved structure information

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def isEmpty: Boolean

Check if this chunk is empty.

Check if this chunk is empty.

Attributes

def length: Int

The length of the chunk content in characters.

The length of the chunk content in characters.

Attributes

def nonEmpty: Boolean

Check if this chunk is non-empty.

Check if this chunk is non-empty.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product