index = VectorStoreIndex(storage_context=storage_context, service_context=service_context) ValueError: One of nodes or index_struct must be provided.
index.as_query_engine()
index.storage_context.persist(persist_dir="./storage") from llama_index import StorageContext, load_index_from_storage storage_context = StorageContext.from_defaults(persist_dir="./storage") index = load_index_from_storage(storage_context)
No index in storage context, check if you specified the right persist_dir.
vector_store = WeaviateVectorStore(weaviate_client = client, index_name="Book", text_key="content")
index = VectorStoreIndex.from_vector_store(vector_store, service_context=service_context)
import logging import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) logging.getLogger().handlers = [] logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))