mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 09:32:22 +03:00
1dc6d88f9b
# Description Minimal working example of `quivr-core` rag with minimal dependencies. --------- Co-authored-by: aminediro <aminedirhoussi@gmail.com>
15 lines
391 B
Python
15 lines
391 B
Python
import tempfile
|
|
|
|
from quivr_core import Brain
|
|
|
|
if __name__ == "__main__":
|
|
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file:
|
|
temp_file.write("Gold is metal.")
|
|
temp_file.flush()
|
|
|
|
brain = Brain.from_files(name="test_brain", file_paths=[temp_file.name])
|
|
|
|
answer = brain.ask("Property of gold?")
|
|
|
|
print("answer :", answer.answer)
|