pinecone_index = self.create_index("books")
vector_store = PineconeVectorStore(pinecone_index=pinecone_index)
self.vector_store = vector_store
service_context = ServiceContext.from_defaults(llm=llm)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
self.index = VectorStoreIndex.from_vector_store(vector_store)
self.query_engine = self.index.as_query_engine()
print(self.query_engine.query("foo"))