Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve path handling and type annotations in FaissVectorStoreCo…
…mponent (#6081) * 📝 (faiss.py): import Path and List modules for better type hinting and file path handling 🐛 (faiss.py): fix issue with building vector store when persist_directory is not provided 🐛 (faiss.py): fix issue with loading FAISS index when index file does not exist 📝 (faiss.py): add type hints for search_documents method parameters and return value 📝 (faiss.py): remove unnecessary logging statements from search_documents method * [autofix.ci] apply automated fixes * 📝 (faiss.py): add 'required' flag to the 'Persist Directory' input field to ensure it is mandatory for the user to provide a value * 🔧 (faiss.py): refactor build_vector_store method to handle persist_directory more efficiently 🔧 (faiss.py): refactor search_documents method to handle persist_directory more efficiently * [autofix.ci] apply automated fixes * 🔧 (faiss.py): refactor get_persist_directory method to return resolved persist directory path or current directory if not set ♻️ (faiss.py): refactor build_vector_store and search_documents methods to use get_persist_directory method for path resolution * ♻️ (faiss.py): refactor resolve_path method to be static and return a string instead of Path object for consistency and clarity --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information