def create_index_from_vector_store(vector_store: PineconeVectorStore): """ Create an index from a pinecone vector store """ # Create a service context service_context = get_service_context() # Create a Pinecone storage context storage_context = get_storage_context(vector_store) # Create the index index = VectorStoreIndex.from_vector_store( service_context=service_context, vector_store=vector_store, # type: ignore storage_context=storage_context, show_progress=false, ) return index