store#

Module containing VectorStore utility

Functions

load_documents(books[, folder])

Retrieve the list of books and store them locally.

Classes

Book(title, url[, filename, encoding])

Simple class to represent a book

VectorStore([documents_path, store_path])

VectorStore class to handle the embedding database

class store.Book(title: str, url: str, filename: str | None = None, encoding: str = 'utf-8')[source]#

Simple class to represent a book

class store.VectorStore(documents_path: str = '/home/runner/work/alice-rag-llm/alice-rag-llm/src/documents', store_path: str = '/home/runner/work/alice-rag-llm/alice-rag-llm/src/store')[source]#

VectorStore class to handle the embedding database

load()[source]#

Reload the vector store from a previous state.

query(query: str, top_passages: int = 5) list[str][source]#

Query the vector store with the specified query and returns the top passages.

Parameters#

querystr

The user provided query.

top_passagesint, optional

The number of passages to return, default is 5.

save()[source]#

Save the vector store locally.

store.load_documents(books: list[Book], folder: str = '/home/runner/work/alice-rag-llm/alice-rag-llm/src/documents')[source]#

Retrieve the list of books and store them locally.

Parameters#

bookslist[Book]

List of books to download

folderstr, optional

The folder where to store the books, by default src/document.