Find answers from the community

Updated 2 months ago

i am trying to create ingestion pipeline

i am trying to create ingestion pipeline, with mongo db atlas, and I am getting this error, any help would be apperciated:
Plain Text
from llama_index.vector_stores.mongodb import MongoDBAtlasVectorSearch
from llama_index.ingestion import IngestionPipeline, DocstoreStrategy
from llama_index.storage.docstore import MongoDocumentStore
from llama_index.storage.index_store import MongoIndexStore

mongo_vector_store = MongoDBAtlasVectorSearch(
    mongodb_client=mongodb_client,
    db_name=f"{collection_name}_db",
    collection_name=collection_name,
    index_name="llm_experiments_index"
)
mongo_doc_store = MongoDocumentStore.from_uri(
    uri=mongo_uri,
    db_name=f"{collection_name}_db"
)

ingestion_pipeline = IngestionPipeline(
            transformations=[embed_model],
            docstore=mongo_doc_store,
            docstore_strategy=DocstoreStrategy.UPSERTS,
            vector_store=mongo_vector_store, <--- "Intellisense below error"
        )


error:
Plain Text
ValidationError: 1 validation error for IngestionPipeline
vector_store
  value is not a valid dict (type=type_error.dict)


Intellisense from pycharm:
Plain Text
Expected type 'Optional[BasePydanticVectorStore]', got 'MongoDBAtlasVectorSearch' instead
L
R
2 comments
ah yea, need to update the mongodb vector store to use the updated base class
thanks πŸ™‚
Add a reply
Sign up and join the conversation on Discord