mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
1dc6d88f9b
# Description Minimal working example of `quivr-core` rag with minimal dependencies. --------- Co-authored-by: aminediro <aminedirhoussi@gmail.com>
20 lines
657 B
Python
20 lines
657 B
Python
from langchain_core.embeddings import DeterministicFakeEmbedding
|
|
from langchain_core.language_models import FakeListChatModel
|
|
|
|
from quivr_core import Brain
|
|
from quivr_core.processor.default_parsers import DEFAULT_PARSERS
|
|
from quivr_core.processor.pdf_processor import TikaParser
|
|
|
|
if __name__ == "__main__":
|
|
pdf_paths = ["../tests/processor/data/dummy.pdf"]
|
|
brain = Brain.from_files(
|
|
name="test_brain",
|
|
file_paths=[],
|
|
llm=FakeListChatModel(responses=["good"]),
|
|
embedder=DeterministicFakeEmbedding(size=20),
|
|
processors_mapping={
|
|
**DEFAULT_PARSERS,
|
|
".pdf": TikaParser(),
|
|
},
|
|
)
|