Skip to content
LlamaParse 文档版本 跟随上游 源快照 4e4a9288 更新于 2026-10-16

已弃用

本页记录的是已弃用的 Parse v1 API。新的接入请使用 Parse v2;改造已有的 v1 代码请见v1 到 v2 迁移指南。

解析指令(parsing instruction)仍然可用,但已弃用。请改用提示词。

LlamaParse 底层可以调用 LLM,因此你能用自然语言告诉它「解析什么、怎么解析」。这是一个极其强大的能力!

我们支持三种指令,且可以互相组合使用(三种同时设置也是可以的)

content_guideline_instruction(已弃用)

如果你想让 LlamaParse 改变 / 转换内容本身,应该用 content_guideline_instruction。

  • Python
  • API
parser = LlamaParse(
  content_guideline_instruction="If output is not in english, translate it in english."
)

终端窗口

curl -X 'POST' \
  'https://api.cloud.llamaindex.ai/api/v1/parsing/upload'  \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
  --form '>content_guideline_instruction="If output is not in english, translate it in english."' \
  -F 'file=@/path/to/your/file.pdf;type=application/pdf'

complemental_formatting_instruction(已弃用)

如果你想以某种方式改变 LlamaParse 输出文档的排版,但又要保留 markdown 的输出格式,应该用 complemental_formatting_instruction。这样做不会覆盖我们的排版体系,能让你在我们的排版之上做改进。

  • Python
  • API
parser = LlamaParse(
  complemental_formatting_instruction="For headings, do not output level 1 heading, start at level 2 (##)"
)

终端窗口

curl -X 'POST' \
  'https://api.cloud.llamaindex.ai/api/v1/parsing/upload'  \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
  --form 'complemental_formatting_instruction="For headings, do not output level 1 heading, start at level 2 (##)"' \
  -F 'file=@/path/to/your/file.pdf;type=application/pdf'

formatting_instruction(已弃用)

这允许你覆盖 LlamaParse 做出的任何排版指令。如果你不希望模型输出 Markdown 而想输出别的东西,就用它。但请注意,formating_instruction 很容易让 LlamaParse 的表现变差,因为它覆盖了我们的排版与排版修正(例如表格抽取)。

  • Python
  • API
parser = LlamaParse(
  formatting_instruction="Output the document as a Latex page. For table use HTML"
)

终端窗口

curl -X 'POST' \
  'https://api.cloud.llamaindex.ai/api/v1/parsing/upload'  \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
  --form 'formatting_instruction="Output the document as a Latex page. For table use HTML"' \
  -F 'file=@/path/to/your/file.pdf;type=application/pdf'

BytesRouter 是社区翻译站点,所有译文仅供参考,一切以官方英文原文为准。