class_docstr: A class for converting a dataframe and/or url to a vectorstore embedded with a given embeddings model
class_docstr_tok: ["A","class","for","converting","a","dataframe","and\/or","url","to","a","vectorstore","embedded","with","a","given","embeddings","model"]
docstr: Create DB from documents in batches, this is used for chromadb to get around the add limit
  in sqlite implementation of later versions of chromadb
docstr_tok: ["Create","DB","from","documents","in","batches",",","this","is","used","for","chromadb","to","get","around","the","add","limit","in","sqlite","implementation","of","later","versions","of","chromadb"]
code: def create_db_from_batch_documents(self, documents, embeddings_model):
      """
      Create DB from documents in batches, this is used for chromadb to get around the add limit
      in sqlite implementation of later versions of chromadb
      """
      batches_documents = self._create_batch_embeddings(
          documents, self.args.embeddings_batch_size
      )
      n_batches = (
          len(documents) // self.args.embeddings_batch_size
          if len(documents) >= self.args.embeddings_batch_size
          else 1
      )
      try:
          for batch_id, batch_document in enumerate(batches_documents):
              _ = self.create_db_from_documents(
                  batch_document, embeddings_model
              )
              logger.info(
                  f"Added batch {batch_id + 1} of {n_batches} batches to vector db"
              )
  
      except Exception as e:
          raise Exception(
              f"Error loading embeddings batches to {self.args.vector_store_name}: {e}"
          )
  
file_path: mindsdb/mindsdb/integrations/handlers/rag_handler/ingest.py
imports: import time
  from typing import List
  import pandas
  from langchain.schema import Document
  from langchain.text_splitter import RecursiveCharacterTextSplitter
  from langchain.vectorstores import VectorStore
  from mindsdb.integrations.handlers.rag_handler.settings import PersistedVectorStoreSaver, PersistedVectorStoreSaverConfig, RAGBaseParameters, VectorStoreFactory, df_to_documents, get_chroma_client, load_embeddings_model, url_to_documents
  from mindsdb.utilities import log
label_desc: Use image node_id 6 for calling the RAGIngestor obj's underlying member method code with example usage: obj.create_db_from_batch_documents(documents, embeddings_model) without return types