Stroring the index in a format other than json
Hi all,
I am using LayoutPDFReader to read multiple documents
`doc = pdf_loader.read_pdf(pdf)
documents.append(doc) `
Than create an index using the following code
`for doc in documents:
for chunk in doc.chunks():
index.insert(Document(text=chunk.to_context_text(), extra_info={}))`
Now I need to store a perisistant copy of the index. Currently when using
`index.storage_context.persist("Test")`
the index is stored as a json file.
Since one cannot use the _from_documents_ call (I get an error AttributeError: 'Document' object has no attribute 'get_doc_id') ,
how can I save the database in SQL format or any other format.
Thanks
0 条评论