Chunk
datapizza.type.Chunk
dataclass
A class for storing the chunk response from a client.
__init__
Initialize a Chunk object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The id of the chunk. |
required |
text
|
str
|
The text of the chunk. |
required |
embeddings
|
list[Embedding]
|
The embeddings of the chunk. Defaults to []. |
None
|
metadata
|
dict
|
The metadata of the chunk. Defaults to {}. |
None
|
Overview
The Chunk
class represents a unit of text content that has been segmented from a larger document. It's a fundamental data structure in datapizza-ai used throughout the RAG pipeline for text processing, embedding, and retrieval operations.
Serializable: Can be easily stored and retrieved from databases