Find answers from the community

Updated last year

Is it straightforward to use langchain

Is it straightforward to use langchain document loaders (e.g. PDFPlumberLoader) with Llama Index please?
R
L
4 comments
Plain Text
documents = PDFPlumberLoader('some_pdf.pdf').load()
index = VectorStoreIndex.from_documents(documents)
AttributeError: 'Document' object has no attribute 'get_doc_id'
Need to convert

Plain Text
from llama_index import Document
documents = <lc loader>
llama_docs = []
for doc in documents:
  llama_docs.append(Document.from_langchain_format(doc))
Thank you so much Logan
Add a reply
Sign up and join the conversation on Discord