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 vectorstore from documents and store locally.
docstr_tok: ["Create","vectorstore","from","documents","and","store","locally","."]
code: def embeddings_to_vectordb(self) -> None:
      """Create vectorstore from documents and store locally."""
  
      start_time = time.time()
  
      # Load documents and splits in chunks (if not in evaluation_type mode)
      documents = self.split_documents(
          chunk_size=self.args.chunk_size,
          chunk_overlap=self.args.chunk_overlap,
      )
  
      # Load embeddings model
      embeddings_model = load_embeddings_model(
          self.embeddings_model_name, self.args.use_gpu
      )
  
      logger.info(f"Creating vectorstore from documents")
  
      if not validate_documents(documents):
          raise ValueError("Invalid documents")
  
      if self.args.vector_store_name == "chromadb":
          # chromadb does autosave in latest version, just for the saver PersistedVectorStoreSaver
          db = self.create_db_from_batch_documents(
              documents, embeddings_model
          )
  
      else:
          try:
              db = self.create_db_from_documents(
                  documents, embeddings_model
              )
          except Exception as e:
              raise Exception(
                  f"Error loading embeddings to {self.args.vector_store_name}: {e}"
              )
  
      config = PersistedVectorStoreSaverConfig(
          vector_store_name=self.args.vector_store_name,
          vector_store=db,
          persist_directory=self.args.vector_store_storage_path,
          collection_name=self.args.collection_name,
      )
  
      vector_store_saver = PersistedVectorStoreSaver(config)
  
      vector_store_saver.save_vector_store(db)
  
      db = None  # Free up memory
  
      end_time = time.time()
      elapsed_time = round(end_time - start_time)
  
      logger.info(
          f"Finished creating {self.args.vector_store_name} from texts, it has been "
          f"persisted to {self.args.vector_store_storage_path}"
      )
  
      time_minutes = round(elapsed_time / 60)
  
      if time_minutes > 1:
          logger.info(f"Elapsed time: {time_minutes} minutes")
      else:
          logger.info(f"Elapsed time: {elapsed_time} seconds")
  
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 7 for calling the RAGIngestor obj's underlying member method code with example usage: obj.embeddings_to_vectordb() without return types