Toggle navigation
Toggle navigation
This project
Loading...
Sign in
zhouhui.jiang
/
Test_LangGraph
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zhouhui.jiang
2025-11-15 21:09:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b8351712c2d5cd8145e1ade4d445f7f09fddc385
b8351712
1 parent
77e950c5
update
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
API/paperless_api.py
API/paperless_api.py
View file @
b835171
...
...
@@ -107,14 +107,16 @@ def upload_file_for_ocr(
pdf_path
:
str
,
Authorization
:
Optional
[
str
]
=
None
,
)
->
str
:
"""上传文件进行OCR识别
"""上传文件图文识别
只需要提供文件路径(pdf_path、Authorization),上传时文件路径不用确认,路径肯定是完整的,文件肯定是存在的,请直接调用工具接口。
Args:
pdf_path: 本地 PDF 文件路径(必填)
Authorization: 授权令牌,如果提供则使用该值,否则使用 API_CONFIG 中的默认值
Returns:
文本:成功/失败信息
返回 JSON 字符串,包含 status、message、chmCode(运单编号)、chmId(运单ID)。这些参数可以用于后续的 create_waybill_d_with_id 工具调用
"""
if
not
os
.
path
.
isfile
(
pdf_path
):
return
f
"参数错误: 文件不存在 - {pdf_path}"
...
...
Please
register
or
login
to post a comment