vector_store = FaissVectorStore.from_persist_dir(FAISS_INDEX_PATH)
storage_context = StorageContext.from_defaults(
vector_store=vector_store, persist_dir=FAISS_INDEX_PATH
)
# generate embeddings for each node
for node in nodes:
node_embedding = base_embeddings.get_text_embedding(
node.get_content(metadata_mode="all")
)
node.embedding = node_embedding
print(node_embedding)
# index the message in the vector db
vector_store.add(nodes)
index.storage_context.persist()
nope, same stuff.... Did you run the notebook on your local? or can you try to run the script above on your local to see if that's an environment issue from my side?
I found the issue. You need at least 10 nodes in your index store. Since I was only loading one document with one sentence only, it creates only one node and fails.