pymupdf / RAG

RAG (Retrieval-Augmented Generation) Chatbot Examples Using PyMuPDF
https://pymupdf.readthedocs.io/en/latest/pymupdf4llm
GNU Affero General Public License v3.0
539 stars 82 forks source link

[Hotfix] Fixed import and method used for version 0.0.2 (Import issue) #12

Closed YanSte closed 6 months ago

YanSte commented 6 months ago

Hi @JorjMcKie,

I noticed some issues with the import. I've fixed them.

PS: Version 0.0.2 does not work without this fix.

Screenshot 2024-05-20 at 23 20 33
xdave commented 6 months ago

Just encountered this issue. Eagerly awaiting this fix. Thanks.

YanSte commented 6 months ago

I have this problem too, I will add it to this pull request as well.

with error: name 'page' is not defined.

xdave commented 6 months ago

Interestingly, when I roll back to version 0.0.1, i get:

AttributeError: module 'pymupdf4llm' has no attribute 'to_markdown'
YanSte commented 6 months ago

Yes you have to remove fully.

Or you can base on my PR. I'm trying to fix the issues.

YanSte commented 6 months ago

@JorjMcKie some issue are on

pathname = save_image(page<<

YanSte commented 6 months ago

@xdave I think I fixed all the issues. You can try with my branch

xdave commented 6 months ago

@YanSte confirmed works

YanSte commented 6 months ago

Perfect thanks for your support, now let's wait for approval from @JorjMcKie.

JorjMcKie commented 6 months ago

Thank you!

YanSte commented 6 months ago

@JorjMcKie Just check save_image with None for the vec image I wasn't sure about.