mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 04:42:38 +02:00
代码优化
This commit is contained in:
parent
f9d3a8c521
commit
6c39c80d94
3 changed files with 2 additions and 2 deletions
|
|
@ -122,6 +122,7 @@ class OmniParseClient:
|
|||
OmniParsedResult: The result of the pdf parsing.
|
||||
"""
|
||||
self.verify_file_ext(file_input, {".pdf"})
|
||||
# parse_pdf supports parsing by accepting only the byte data of the file.
|
||||
file_info = await self.get_file_info(file_input, only_bytes=True)
|
||||
endpoint = f"{self.parse_document_endpoint}/pdf"
|
||||
resp = await self._request_parse(endpoint=endpoint, files={"file": file_info})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue