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.
docstr_tok: ["Create","DB","from","documents","."]
code: def create_db_from_documents(
      self, documents, embeddings_model
  ) -> VectorStore:
      """Create DB from documents."""
  
      if self.args.vector_store_name == "chromadb":
          return self.vector_store.from_documents(
              documents=documents,
              embedding=embeddings_model,
              client=get_chroma_client(
                  persist_directory=self.args.vector_store_storage_path
              ),
              collection_name=self.args.collection_name,
          )
      else:
          return self.create_db_from_texts(documents, embeddings_model)
  
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 3 for calling the RAGIngestor obj's underlying member method code with example usage: obj.create_db_from_documents(documents, embeddings_model) and returns: self, self