SciPhi-AI / R2R

The most advanced Retrieval-Augmented Generation (RAG) system, containerized and RESTful
https://r2r-docs.sciphi.ai/
MIT License
3.65k stars 270 forks source link

Fix type errors, pass collection id #1595

Closed NolanTrem closed 2 days ago

NolanTrem commented 2 days ago

[!IMPORTANT] Fix type errors and improve type hinting, ensuring correct collection ID passing in various functions.

  • Type Hinting Improvements:
    • Replace Union with | for type hinting in agent.py and ingestion_router.py.
    • Update type hints in retrieval_service.py and kg_service.py to use modern syntax.
  • Parameter Passing:
    • Ensure collection_ids are passed correctly in assign_document_to_collection_relational() in database.py.
    • Pass collection_ids in create_document() in documents_router.py.
  • Miscellaneous:
    • Add # type: ignore comments to suppress type errors in various files like ingestion_router.py and management_router.py.
    • Remove duplicate DocumentSearchResult class in responses.py.

This description was created by Ellipsis for 6f2a9680eae3a2e20dbb149add6225101dd45cf0. It will automatically update as commits are pushed.