Find answers from the community

Updated 2 months ago

can we use multiple result_type: ```LlamaParse(result_type="markdown").load_data("./apple_

can we use multiple result_type:
Plain Text
LlamaParse(result_type="markdown").load_data("./apple_2021_10k.pdf")
k
2 comments
Please stand by @andysingal as I search the knowledge base. I normally take about 20 seconds or so. :wave:
----------------------
Yes, you can use multiple result_type with LlamaParse. The result_type parameter in LlamaParse determines the format of the parsed data. The two available options are "markdown" and "text".

Here is an example of how you can use it:

Plain Text
from llama_parse import LlamaParse

# Load data as markdown
docs_markdown = LlamaParse(result_type="markdown").load_data("./apple_2021_10k.pdf")

# Load data as text
docs_text = LlamaParse(result_type="text").load_data("./apple_2021_10k.pdf")


In the above code, docs_markdown will contain the parsed data in markdown format, while docs_text will contain the parsed data in plain text format.

Please note that you need to replace "./apple_2021_10k.pdf" with the actual path to your PDF file.

Sources:
  • LlamaIndex > En > Latest > Examples > Llm > set up parser ()
  • LlamaIndex > En > Latest > Understanding > Agent > Enhancing with LlamaParse Part 1 ()
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Add a reply
Sign up and join the conversation on Discord