Closed Jimchoo91 closed 11 months ago
Sorry for the delay on this. The error happens with the pdf you posted here, correct? I just reproduced a 504 error with this and will do some digging.
I think this is due to pdfs taking a long time to process, and sometimes the server times out. As a workaround, you may want to try sending individual pages and combining the results. Here's a gist of splitting up a pdf and sending the pages to the api. In Langchain's case, I think you can write out the pages and pass individual filenames into the loader.
We just addressed some low memory issues in the hosted API which could lead to 502s. And the comment above should hopefully remove any 504 timeouts. Going to close this, but please let us know if the issue persists.
As in the subject line, I have received this error a few times across the course of the last few hours.
Full code