Hi , using llamaindex i am trying to read an pdf and after chunking and embedding trying to lead the document into azurecosmos db , But i am getting following error --pymongo.errors.OperationFailure: cosmosSearchOptions, full error: {'ok': 0.0, 'errmsg': 'cosmosSearchOptions', 'code': 197, 'codeName': 'InvalidIndexSpecificationOption'} my code is as below import openai from llama_index.llms.openai import OpenAI from llama_index.core import Settings from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, get_response_synthesizer from llama_index.core import StorageContext, ServiceContext, load_index_from_storage from llama_index.embeddings.openai import OpenAIEmbedding import pymongo from llama_index.vector_stores.azurecosmosmongo import ( AzureCosmosDBMongoDBVectorSearch, ) import json import certifi mounted_fldr = "Users/vivek/Documents/pycharmprojects/docs_process_llamaindex" config_file = f"/{mounted_fldr}/config/config1.json" src_data = f"/{mounted_fldr}/src_data"
index_dir = f"/{mounted_fldr}/index_data"
Set up your OpenAI API key
with open(config_file) as f: config = json.load(f)
You'll have to debug where exactly the error is popping. These are third party vector stores mostly made by community Based on seeing the error, it looks like it has something to do with Index. explore further in this direction
@WhiteFang_Jr can you tell, how can i retrieve the indexes saved in azure cosmos db and then perform the query. I am not able to find the page with required packages I have saved the documents indexes and embedding with below code vector_store = AzureCosmosDBMongoDBVectorSearch( mongodb_client=mongodb_client, db_name="db_llama", collection_name="test_db_pdf", index_name="pdf_index"
)
storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents( documents, storage_context=storage_context,
@WhiteFang_Jr creating vector store is and loading data will be done by pipeline and there is another service, that willl be accessing it from the loaded index in vector store. above page talk about laoding data in vector store.how to retrieve that saved index not mentioned anywhere