code: import lancedb
  from langchain_community.embeddings import GPT4AllEmbeddings
  from langchain_community.vectorstores import LanceDB
  from langchain.text_splitter import RecursiveCharacterTextSplitter
  from langchain_community.document_loaders import TextLoader, PyPDFLoader
  
  db = lancedb.connect("./lancedb")
  table = db.create_table(
      "peter_griffin",
      data=[
          {
              "vector": GPT4AllEmbeddings().embed_query("hello world"),
              "text": "hello world",
              "id": "1",
          }
      ],
      mode="overwrite",
  )
  
  splitter = RecursiveCharacterTextSplitter(chunk_size=256, chunk_overlap=0)
  
  # rawDoc = TextLoader("./docs/FakeWiki.txt").load()
  
  rawDoc = PyPDFLoader('./docs/Peter_Griffin.pdf').load()
  
  documents = splitter.split_documents(rawDoc)
  
  print(len(documents))
  
  vectorStore = LanceDB(connection=table, embedding=GPT4AllEmbeddings())
  
  vectorStore.add_documents(documents=documents)
  
apis: lancedb.connect
extract_api: [((275, 303), 'lancedb.connect', 'lancedb.connect', (['"""./lancedb"""'], {}), "('./lancedb')\n", (290, 303), False, 'import lancedb\n'), ((552, 615), 'langchain.text_splitter.RecursiveCharacterTextSplitter', 'RecursiveCharacterTextSplitter', ([], {'chunk_size': '(256)', 'chunk_overlap': '(0)'}), '(chunk_size=256, chunk_overlap=0)\n', (582, 615), False, 'from langchain.text_splitter import RecursiveCharacterTextSplitter\n'), ((679, 718), 'langchain_community.document_loaders.PyPDFLoader', 'PyPDFLoader', (['"""./docs/Peter_Griffin.pdf"""'], {}), "('./docs/Peter_Griffin.pdf')\n", (690, 718), False, 'from langchain_community.document_loaders import TextLoader, PyPDFLoader\n'), ((846, 865), 'langchain_community.embeddings.GPT4AllEmbeddings', 'GPT4AllEmbeddings', ([], {}), '()\n', (863, 865), False, 'from langchain_community.embeddings import GPT4AllEmbeddings\n'), ((393, 412), 'langchain_community.embeddings.GPT4AllEmbeddings', 'GPT4AllEmbeddings', ([], {}), '()\n', (410, 412), False, 'from langchain_community.embeddings import GPT4AllEmbeddings\n')]