Find answers from the community

Updated 3 months ago

If I am using llama parse and I want to

If I am using llama parse and I want to pass a pdf file through that I dont have locally? For example when I am retrieving a pdf via a python script how do I feed that through?

Something like this?

pdf_file = BytesIO(content)
reader = PdfReader(pdf_file)

The example

parser = LlamaParse(
api_key="llx-...", # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown", # "markdown" and "text" are available
num_workers=4, # if multiple files passed, split in num_workers API calls
verbose=True,
language="en", # Optionally you can define a language, default=en
)

sync

documents = parser.load_data("./my_file.pdf")

Is for a local file
L
1 comment
llama-parse should work with passing in bytes πŸ‘€
Add a reply
Sign up and join the conversation on Discord