Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stroring the index in a format other than json #111

Open
jozamm opened this issue Dec 6, 2024 · 0 comments
Open

Stroring the index in a format other than json #111

jozamm opened this issue Dec 6, 2024 · 0 comments

Comments

@jozamm
Copy link

jozamm commented Dec 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant