AI-Northstar-Tech / vector-io

Comprehensive Vector Data Tooling. The universal interface for all vector database, datasets and RAG platforms. Easily export, import, backup, re-embed (using any model) or access your vector data from any vector databases or repository.
https://vector-io.com
Apache License 2.0
220 stars 27 forks source link

LlamaIndex export attempt #62

Closed dhruv-anand-aintech closed 6 months ago

dhruv-anand-aintech commented 8 months ago

current error while trying to access vectors via index._storage_context.vector_store.query(query=VectorStoreQuery(node_ids=docs.keys())):

  File "/opt/homebrew/lib/python3.11/site-packages/vdf_io/export_vdf/llamaindex_export.py", line 34, in export_vdb
    export_obj.get_data()
  File "/opt/homebrew/lib/python3.11/site-packages/vdf_io/export_vdf/llamaindex_export.py", line 56, in get_data
    self.index._storage_context.vector_store.query(
  File "/opt/homebrew/lib/python3.11/site-packages/llama_index/core/vector_stores/simple.py", line 273, in query
    top_similarities, top_ids = get_top_k_embeddings(
                                ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/llama_index/core/indices/query/embedding_utils.py", line 30, in get_top_k_embeddings
    similarity = similarity_fn(query_embedding_np, emb)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/llama_index/core/base/embeddings/base.py", line 47, in similarity
    product = np.dot(embedding1, embedding2)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

cc @ravi03071991