fabricatio_lancedb.models.lancedb

This module contains the models for the lancedb.

Classes

LancedbDocumentModel

LanceDB-specific document model extending the base DocumentModel.

Module Contents

class fabricatio_lancedb.models.lancedb.LancedbDocumentModel[ST: fabricatio_lancedb.rust.StoreDocument, SR: fabricatio_lancedb.rust.SearchedDocument](/, **data: Any)

Bases: fabricatio_rag.models.document.StoredDocumentModel[ST], fabricatio_rag.models.document.SearchedDocumentModel

LanceDB-specific document model extending the base DocumentModel.

content: str
metadata: dict[str, Any] | None = None
prepare_insertion(vector: Sequence[float]) ST

Prepares the data for insertion into LanceDB.

classmethod from_raw(raw: SR) Self

Create a document model from a raw LanceDB search result.

classmethod with_text_chunk(chunk: str) Self

Create a document model instance from a plain text chunk.