********** Trace: index_construction **********
vector_store = AzureAISearchVectorStore( search_or_index_client=search_client, filterable_metadata_field_keys=metadata_fields, index_management=IndexManagement.VALIDATE_INDEX, id_field_key="id", chunk_field_key="chunk", embedding_field_key="embedding", embedding_dimensionality=1536, metadata_string_field_key="metadata", doc_id_field_key="doc_id", ) storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents( [], storage_context=storage_context, callback_manager=callback_manager )
from_documents
or the constructor itself for nodes i.e. VectorStoreIndex(nodes=nodes, ...)
, but the point is since you are passing in an empty list, there is nothing to trace πcallback_manager = CallbackManager([LlamaDebugHandler()])
# Load documents documents = SimpleDirectoryReader("../data/paul_graham/").load_data() storage_context = StorageContext.from_defaults(vector_store=vector_store) Settings.llm = llm Settings.embed_model = embed_model index = VectorStoreIndex.from_documents( documents, storage_context=storage_context, callback_manager=callback_manager )
llm = OpenAI(..., callback_manager=callback_manager)
embed_model = OpenAIEmbedding(..., callback_manager=callback_manager)