CorpusRecord#

class scikitplot.corpus.CorpusRecord(record_id, chunk, doc_id, collection, created_at, embedding=None, storage_metadata=<factory>)[source]#

A persisted record combining a Chunk with storage metadata.

Parameters:
record_idstr

Unique storage record identifier (e.g. UUID or hash).

chunkChunk

The stored text chunk.

doc_idstr

Parent document identifier.

collectionstr

Storage collection / table / index name.

created_atstr

ISO-8601 creation timestamp (YYYY-MM-DDTHH:MM:SSZ).

embeddingEmbeddingVector or None

Optional pre-computed embedding for this record.

storage_metadataMetadataDict

Backend-specific storage metadata.

Parameters:

Notes

created_at is stored as a string to avoid importing datetime and to remain fully JSON-serialisable without extra encoders.

chunk: Chunk[source]#
collection: str[source]#
created_at: str[source]#
doc_id: str[source]#
embedding: list[float] | None = None#
record_id: str[source]#
storage_metadata: dict[str, Any][source]#