Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ async def _flush_embedding_buffer(
)
)

if documents:
dims = {len(d.vector) for d in documents}
if len(dims) > 1:
msg = f"Inconsistent embedding dimensions: {dims}. Check that your embedding model returns consistent vector sizes."
callbacks.error(msg)
raise ValueError(msg)

vector_store.load_documents(documents)

if skipped > 0:
Expand Down
2 changes: 1 addition & 1 deletion packages/graphrag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
"graspologic-native~=1.2",
"json-repair~=0.30",
"networkx~=3.4",
"nltk~=3.9",
"nltk>=3.9.3",
"numpy~=2.1",
"pandas~=2.3",
"pyarrow~=22.0",
Expand Down