Find answers from the community

Updated 10 months ago

llama_parse/examples/demo_json.ipynb at ...

At a glance
hey πŸ‘‹ - working on setting up a test for JSON mode in the new parser on a .pdf file based on the demo in https://github.com/run-llama/llama_parse/blob/main/examples/demo_json.ipynb

  1. Has anyone run into a content violation error that prevents the get_text_nodes function from populating the dictionary? I've tried both Anthro and OpenAI's multimodal models - with the same result (error message below).
  2. I believe this error is on the Llama-parser side, not on the LLM - but clarification on that would be awesome.
Also, the pdf in testing doesn't have anything close to questionable images. It's a arxiv pdf.

Plain Text
BadRequestError: Error code: 400 - {'error': {'message': 'Your input image may contain content that is not allowed by our safety system.', 'type': 'invalid_request_error', 'param': None, 'code': 'content_policy_violation'}}


Interested in exploring a potential exception solution where any content_violation_policy is skipped. Any thoughts, feedback, or ideas on this would be awesome, thanks!
d
L
4 comments
fwiw - I moved on w/o an exception and successfully implemented a multimodal JSON parsing on images with a different pdf file - and it worked great. The problems of content violation that appeared on my first test pdf do have me thinking about how to best incorporate some kind of error handling for this kind of thing however - open to ideas on solutions for this specific point.

Also as ref: here is the test pdf I used that caused the content violation https://arxiv.org/pdf/2302.14045.pdf - can't figure what may have flagged the model other than pg 26 that has a photo of a book titled "The Hate U Give" πŸ€·β€β™‚οΈ
@Logan M hi - anything you could offer on this front when you have a moment would be a big help. TY!
Besides adding something to skip nodes that return an API error, not sure. Id be worried about skipping all the LLM calls when for example the user has the wrong API key or something silly

I welcome a PR
Okay sounds good, thx @Logan M, we'll keep working it and we'll see what we come up with.
Add a reply
Sign up and join the conversation on Discord