CosmosShadow / gptpdf

Using GPT to parse PDF
MIT License
2.76k stars 212 forks source link

Some pages parsed error. #35

Closed fatsandfreedom closed 1 month ago

fatsandfreedom commented 1 month ago

There are 25 pages of a pdf file. Most of them are parsed successfully, but in some pages, the system parse failure. The error message is as follows:

openai.APIStatusError:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.24.0 (Ubuntu)

CosmosShadow commented 1 month ago

Are you use a proxy?

fatsandfreedom commented 1 month ago

Yes, I use a proxy.

fatsandfreedom commented 1 month ago

Thank you to the open-source author for pointing out that the problem was with the proxy. I have fix the error last week.

The error "413 Request Entity Too Large" means that the request is too big. This usually happens because Nginx has a default limit on the size of requests. To fix this, add or modify the following line in nginx.conf:

http {
    ...
    client_max_body_size 50M;  # Or whatever maximum size need
    ...
}