Skip to content

Commit 2fd07a4

Browse files
authored
[Fix] Correct the PaddleOCR's request header prefix and update the documentation (#2140)
* Fix header prefix * Remove unused description
1 parent 5288def commit 2fd07a4

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

tools/paddleocr/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
**[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) is an industry-leading, production-ready OCR and document AI engine, offering end-to-end solutions from text extraction to intelligent document understanding.** This plugin provides several capabilities from PaddleOCR, including text recognition, document parsing, and more.
66

7-
> In version 0.0.1, only the text recognition tool was available, and the plugin was called "PaddleOCR Text Recognition". Starting from version 0.1.0, the plugin was refactored into an all-in-one solution that includes not only the text recognition tool but also additional capabilities such as the document parsing tool.
8-
97
## Configuration
108

119
### 1. Get the PaddleOCR plugin from Plugin Marketplace

tools/paddleocr/manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.1.0
1+
version: 0.1.1
22
type: plugin
33
author: langgenius
44
name: paddleocr
@@ -16,7 +16,7 @@ plugins:
1616
tools:
1717
- provider/paddleocr.yaml
1818
meta:
19-
version: 0.1.0
19+
version: 0.1.1
2020
arch:
2121
- amd64
2222
- arm64

tools/paddleocr/tools/document_parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _invoke(self, tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessag
6666
try:
6767
resp = requests.post(
6868
api_url,
69-
headers={"Authorization": f"Bearer {access_token}"},
69+
headers={"Authorization": f"token {access_token}"},
7070
json=params,
7171
)
7272
resp.raise_for_status()

tools/paddleocr/tools/text_recognition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _invoke(self, tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessag
4646
try:
4747
resp = requests.post(
4848
api_url,
49-
headers={"Authorization": f"Bearer {access_token}"},
49+
headers={"Authorization": f"token {access_token}"},
5050
json=params,
5151
)
5252
resp.raise_for_status()

0 commit comments

Comments
 (0)