Find answers from the community

Home
Members
nicotbf
n
nicotbf
Offline, last seen 4 months ago
Joined September 25, 2024
Hello everyone,
Until now I had a simple script that worked very well, simply using :
index = load_index_from_storage( StorageContext.from_defaults(persist_dir="./citation"), )

Then :

response = index.as_query_engine(llm=llm).query( my_query )

However, now I systematically get an error:

File ".../python3.9/site-packages/llama_index/core/base/embeddings/base.py", line 57, in similarity product = np.dot(embedding1, embedding2) ValueError: shapes (1536,) and (3072,) not aligned: 1536 (dim 0) != 3072 (dim 0)


However, I tried to redo the source indexing by deleting the ./citation directory and redoing the following command, but with no success :
documents = SimpleDirectoryReader("./data").load_data() index = VectorStoreIndex.from_documents( documents, ) index.storage_context.persist(persist_dir="./citation")
2 comments
n
W