Skip to content

Guard vector store initialization when no documents are loaded#52

Open
Sasyamerugu wants to merge 1 commit intosugarlabs:mainfrom
Sasyamerugu:fix/vectorstore-empty-docs
Open

Guard vector store initialization when no documents are loaded#52
Sasyamerugu wants to merge 1 commit intosugarlabs:mainfrom
Sasyamerugu:fix/vectorstore-empty-docs

Conversation

@Sasyamerugu
Copy link

Prevent IndexError during FAISS initialization when DOC_PATHS is empty.

Previously, FAISS.from_documents() was called with an empty list, causing a startup crash.

This change skips vector store creation when no documents are loaded and logs a warning instead.

Prevent IndexError during FAISS initialization when DOC_PATHS is empty.

Previously, FAISS.from_documents() was called with an empty list,
causing a startup crash.

This change skips vector store creation when no documents are loaded
and logs a warning instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant