def insert():
from time import time
with open("./book.txt", encoding="utf-8-sig") as f:
FAKE_TEXT = f.read()
remove_if_exist(f"{WORKING_DIR}/milvus_lite.db")
remove_if_exist(f"{WORKING_DIR}/kv_store_full_docs.json")
remove_if_exist(f"{WORKING_DIR}/kv_store_text_chunks.json")
remove_if_exist(f"{WORKING_DIR}/kv_store_community_reports.json")
remove_if_exist(f"{WORKING_DIR}/graph_chunk_entity_relation.graphml")
half_len = len(FAKE_TEXT) // 2
rag = GraphRAG(
working_dir=WORKING_DIR,
enable_llm_cache=True,
best_model_func=deepseepk_model_if_cache,
cheap_model_func=deepseepk_model_if_cache,
embedding_func=local_embedding,
)
start = time()
rag.insert(FAKE_TEXT)
print("indexing time:", time() - start)
File "/home/xxxx/anaconda3/lib/python3.11/site-packages/nano_vectordb/dbs.py", line 71, in __post_init__
storage["embedding_dim"] == self.embedding_dim
AssertionError: Embedding dim mismatch, expected: 384, but loaded: 1536
依据example中的示例,同时切换llm和本地embedding后,出现维度不匹配报错
是node2vec_params的原因吗,测试了一下好像好事会报错 https://github.com/gusye1234/nano-graphrag/blob/3a8c406211fc415e4c45f014cce5f8d34d40062a/nano_graphrag/graphrag.py#L56-L66