mirror of
https://github.com/QuivrHQ/quivr.git
synced 2025-01-05 23:03:53 +03:00
285fe5b960
# Description This PR includes far too many new features: - detection of user intent (closes CORE-211) - treating multiple questions in parallel (closes CORE-212) - using the chat history when answering a question (closes CORE-213) - filtering of retrieved chunks by relevance threshold (closes CORE-217) - dynamic retrieval of chunks (closes CORE-218) - enabling web search via Tavily (closes CORE-220) - enabling agent / assistant to activate tools when relevant to complete the user task (closes CORE-224) Also closes CORE-205 ## 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: Stan Girard <stan@quivr.app>
21 lines
511 B
Python
21 lines
511 B
Python
import tempfile
|
|
|
|
from quivr_core import Brain
|
|
|
|
import dotenv
|
|
|
|
dotenv.load_dotenv()
|
|
|
|
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? answer in french")
|
|
print("answer QuivrQARAGLangGraph :", answer)
|