code: import lancedb
  from langchain.vectorstores import LanceDB
  from langchain.document_loaders import DirectoryLoader
  from langchain.text_splitter import CharacterTextSplitter
  from langchain.embeddings.openai import OpenAIEmbeddings
  db = lancedb.connect(".lance-data")
  path = "/workspace/flancian"
  loader = DirectoryLoader(path, glob="**/*.md")
  data = loader.load()
  text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
  documents = text_splitter.split_documents(data)
  embeddings = OpenAIEmbeddings()
  table = db.create_table(
      "journal",
      data=[
          {
              "vector": embeddings.embed_query("Hello World"),
              "text": "Hello World",
              "id": "1",
              "source": "test"
          }
      ],
      mode="overwrite",
  )
  LanceDB.from_documents(documents, embeddings, connection=table)
  
apis: lancedb.connect
extract_api: [((233, 263), 'lancedb.connect', 'lancedb.connect', (['""".lance-data"""'], {}), "('.lance-data')\n", (248, 263), False, 'import lancedb\n'), ((302, 339), 'langchain.document_loaders.DirectoryLoader', 'DirectoryLoader', (['path'], {'glob': '"""**/*.md"""'}), "(path, glob='**/*.md')\n", (317, 339), False, 'from langchain.document_loaders import DirectoryLoader\n'), ((377, 432), 'langchain.text_splitter.CharacterTextSplitter', 'CharacterTextSplitter', ([], {'chunk_size': '(1000)', 'chunk_overlap': '(0)'}), '(chunk_size=1000, chunk_overlap=0)\n', (398, 432), False, 'from langchain.text_splitter import CharacterTextSplitter\n'), ((494, 512), 'langchain.embeddings.openai.OpenAIEmbeddings', 'OpenAIEmbeddings', ([], {}), '()\n', (510, 512), False, 'from langchain.embeddings.openai import OpenAIEmbeddings\n'), ((763, 826), 'langchain.vectorstores.LanceDB.from_documents', 'LanceDB.from_documents', (['documents', 'embeddings'], {'connection': 'table'}), '(documents, embeddings, connection=table)\n', (785, 826), False, 'from langchain.vectorstores import LanceDB\n')]