pymupdf / RAG

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

Useless variable graphics = [] in pymupdf_rag.py #130

Closed CedricLor closed 2 months ago

CedricLor commented 2 months ago

Hi,

In module pymupdf_rag.py, in nested function get_page_output, a list variable graphics = [] is defined on line 703.

No other value is ever assigned to this variable, nothing is appended to the list, nor the list ever extended. It is however returned by get_page_output and unpacked to another graphics variable in the main function to_markdown on line 840 and then appended as a value to key graphics to the document_output list of dictionaries.

I am not so sure what was meant to be returned here. Based on the other components of the document_output dict, I understand that it should be a list. However, should it be the actual_paths list, the clusters' rectangle list vg_clusters0 or something else?

Regards,

Cédric

JorjMcKie commented 2 months ago

This variable is placeholder for later use.