mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
b767f19f28
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate): --------- Co-authored-by: Zewed <dewez.antoine2@gmail.com>
20 lines
600 B
Python
20 lines
600 B
Python
import tempfile
|
|
|
|
from quivr_core import Brain
|
|
from quivr_core.quivr_rag_langgraph import QuivrQARAGLangGraph
|
|
|
|
if __name__ == "__main__":
|
|
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file:
|
|
temp_file.write("Gold is a liquid of blue-like colour.")
|
|
temp_file.flush()
|
|
|
|
brain = Brain.from_files(
|
|
name="test_brain",
|
|
file_paths=[temp_file.name],
|
|
)
|
|
|
|
answer = brain.ask(
|
|
"what is gold? asnwer in french", rag_pipeline=QuivrQARAGLangGraph
|
|
)
|
|
print("answer QuivrQARAGLangGraph :", answer.answer)
|