llama-index 0.10.19+ has the following errors (I haven't checked prior versions)
def get_pg_storage_context():
from llama_index.storage.docstore.postgres import PostgresDocumentStore
from llama_index.storage.index_store.postgres import PostgresIndexStore
from llama_index.vector_stores.postgres import PGVectorStore
storage_context = StorageContext.from_defaults(
docstore=PostgresDocumentStore.from_uri(uri="postgres://....."),
index_store=PostgresIndexStore.from_uri="postgres://..."),
vector_store=PGVectorStore.from_uri="postgres://...",
)
return storage_context
this raises the following exceptions for docstore and indexstore:
File ~/.virtualenvs/grizzly_3.10/lib/python3.10/site-packages/llama_index/storage/docstore/postgres/base.py:5
3 from llama_index.core.storage.docstore.keyval_docstore import KVDocumentStore
4 from llama_index.core.storage.docstore.types import DEFAULT_BATCH_SIZE
----> 5 from llama_index.storage.kvstore.postgres import PostgresKVStore
ModuleNotFoundError: No module named 'llama_index.storage.kvstore'
same issue with:
llama_index/storage/index_store/postgres/base.py:4
the location of
PostgresKVStore
is at
from llama_index.core.storage.kvstore.postgres_kvstore import PostgresKVStore
Fixing the bad imports allows the function above to run, but I don't know if there is anything else wrong w
PostgresDocumentStore
and
PostgresIndexStore
. Should I submit a PR for this?