code: import chromadb
  from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
  from llama_index.vector_stores.chroma import ChromaVectorStore
  from llama_index.core import StorageContext
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
  from llama_index.core.indices.service_context import ServiceContext
  
  class Vector:
      def __init__(self, doc_location):
          self.client = chromadb.Client()
          self.doc_location = doc_location
          self.collection = self.client.create_collection("papers")
          self.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-base-en-v1.5")
      
      def process_document(self):
              """
              Process the document by performing the following steps:
              1. Read the document.
              2. Set up ChromaVectorStore and load in data.
              3. Create a VectorStoreIndex from the documents using the specified storage context, embed model, and service context.
              """
              service_context = ServiceContext.from_defaults(chunk_size=100, chunk_overlap=10)
              documents = SimpleDirectoryReader(self.doc_location).load_data()
  
              vector_store = ChromaVectorStore(chroma_collection=self.collection)
              storage_context = StorageContext.from_defaults(vector_store=vector_store)
              self.index = VectorStoreIndex.from_documents(
                  documents, storage_context=storage_context, embed_model=self.embed_model, service_context=service_context
              )
      
      def query_document(self, query):
          query_engine = self.index.as_query_engine()
          response = query_engine.query(query)
          return response
apis: llama_index.core.StorageContext.from_defaults llama_index.embeddings.huggingface.HuggingFaceEmbedding llama_index.core.VectorStoreIndex.from_documents llama_index.vector_stores.chroma.ChromaVectorStore llama_index.core.SimpleDirectoryReader llama_index.core.indices.service_context.ServiceContext.from_defaults
extract_api: [((403, 420), 'chromadb.Client', 'chromadb.Client', ([], {}), '()\n', (418, 420), False, 'import chromadb\n'), ((555, 611), 'llama_index.embeddings.huggingface.HuggingFaceEmbedding', 'HuggingFaceEmbedding', ([], {'model_name': '"""BAAI/bge-base-en-v1.5"""'}), "(model_name='BAAI/bge-base-en-v1.5')\n", (575, 611), False, 'from llama_index.embeddings.huggingface import HuggingFaceEmbedding\n'), ((1002, 1064), 'llama_index.core.indices.service_context.ServiceContext.from_defaults', 'ServiceContext.from_defaults', ([], {'chunk_size': '(100)', 'chunk_overlap': '(10)'}), '(chunk_size=100, chunk_overlap=10)\n', (1030, 1064), False, 'from llama_index.core.indices.service_context import ServiceContext\n'), ((1170, 1222), 'llama_index.vector_stores.chroma.ChromaVectorStore', 'ChromaVectorStore', ([], {'chroma_collection': 'self.collection'}), '(chroma_collection=self.collection)\n', (1187, 1222), False, 'from llama_index.vector_stores.chroma import ChromaVectorStore\n'), ((1253, 1308), 'llama_index.core.StorageContext.from_defaults', 'StorageContext.from_defaults', ([], {'vector_store': 'vector_store'}), '(vector_store=vector_store)\n', (1281, 1308), False, 'from llama_index.core import StorageContext\n'), ((1334, 1476), 'llama_index.core.VectorStoreIndex.from_documents', 'VectorStoreIndex.from_documents', (['documents'], {'storage_context': 'storage_context', 'embed_model': 'self.embed_model', 'service_context': 'service_context'}), '(documents, storage_context=storage_context,\n    embed_model=self.embed_model, service_context=service_context)\n', (1365, 1476), False, 'from llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n'), ((1089, 1129), 'llama_index.core.SimpleDirectoryReader', 'SimpleDirectoryReader', (['self.doc_location'], {}), '(self.doc_location)\n', (1110, 1129), False, 'from llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n')]