Mbox Reader
If youโre opening this Notebook on colab, you will probably need to install LlamaIndex ๐ฆ.
%pip install llama-index-readers-mbox!pip install llama-index%env OPENAI_API_KEY=sk-************from llama_index.readers.mbox import MboxReaderfrom llama_index.core import VectorStoreIndexdocuments = MboxReader().load_data( "mbox_data_dir", max_count=1000) # Returns list of documentsindex = VectorStoreIndex.from_documents( documents) # Initialize index with documentsquery_engine = index.as_query_engine()res = query_engine.query("When did i have that call with the London office?")> [query] Total LLM token usage: 100 tokens> [query] Total embedding token usage: 10 tokensres.response> There is a call scheduled with the London office at 12am GMT on the 10th of February.