You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4e2616b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/version3.x/pipeline_usage/PP-ChatOCRv4.en.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -974,6 +974,8 @@ Please note: If you encounter issues such as the program becoming unresponsive,
974
974
975
975
Before performing model inference, you first need to prepare the API key for the large language model. PP-ChatOCRv4 supports large model services on the [Baidu Cloud Qianfan Platform](https://console.bce.baidu.com/qianfan/ais/console/onlineService) or the locally deployed standard OpenAI interface. If using the Baidu Cloud Qianfan Platform, refer to [Authentication and Authorization](https://cloud.baidu.com/doc/qianfan-api/s/ym9chdsy5) to obtain the API key. If using a locally deployed large model service, refer to the [PaddleNLP Large Model Deployment Documentation](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/llm) for deployment of the dialogue interface and vectorization interface for large models, and fill in the corresponding `base_url` and `api_key`. If you need to use a multimodal large model for data fusion, refer to the OpenAI service deployment in the [PaddleMIX Model Documentation](https://github.com/PaddlePaddle/PaddleMIX/tree/develop/paddlemix/examples/ppdocbee2) for multimodal large model deployment, and fill in the corresponding `base_url` and `api_key`.
976
976
977
+
Alternatively, you can call the LLM through [OrcaRouter](https://www.orcarouter.ai), an OpenAI-compatible gateway. After obtaining an API key from [OrcaRouter](https://www.orcarouter.ai), pass it via the `--orcarouter_api_key` argument and the pipeline routes both the chat and vectorization requests to OrcaRouter.
978
+
977
979
**Note**: If local deployment of a multimodal large model is restricted due to the local environment, you can comment out the lines containing the `mllm` variable in the code and only use the large language model for information extraction.
The examples above use local Paddle inference engines by default. By default, each module selects the appropriate local Paddle inference engine according to the default model name: models that support only dynamic graph use `paddle_dynamic`, while models that support both static and dynamic graph prefer `paddle_static`. To run them, first install PaddlePaddle by following [PaddlePaddle Framework Installation](../paddlepaddle_installation.en.md).
@@ -1386,6 +1391,12 @@ Any float > <code>0</code></li>
1386
1391
<td><code>str</code></td>
1387
1392
<td></td>
1388
1393
</tr>
1394
+
<tr>
1395
+
<td><code>orcarouter_api_key</code></td>
1396
+
<td><b>Meaning:</b>API key for the [OrcaRouter](https://www.orcarouter.ai) gateway.</td>
1397
+
<td><code>str</code></td>
1398
+
<td></td>
1399
+
</tr>
1389
1400
<td><code>pp_docbee_base_url</code></td>
1390
1401
<td><b>Meaning:</b>URL for the multimodal large language model service.</td>
Copy file name to clipboardExpand all lines: docs/version3.x/pipeline_usage/PP-DocTranslation.en.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -686,14 +686,17 @@ Before using the PP-DocTranslation pipeline locally, please ensure that you have
686
686
687
687
Please note: If you encounter issues such as the program becoming unresponsive, unexpected program termination, running out of memory resources, or extremely slow inference during execution, please try adjusting the configuration according to the documentation, such as disabling unnecessary features or using lighter-weight models.
688
688
689
-
Before use, you need to prepare the API key for a large language model, which supports the [Baidu Cloud Qianfan Platform](https://console.bce.baidu.com/qianfan/ais/console/onlineService) or local large model services that comply with the OpenAI interface standards.
689
+
Before use, you need to prepare the API key for a large language model, which supports the [Baidu Cloud Qianfan Platform](https://console.bce.baidu.com/qianfan/ais/console/onlineService) or local large model services that comply with the OpenAI interface standards. Alternatively, you can use [OrcaRouter](https://www.orcarouter.ai), an OpenAI-compatible gateway: after obtaining an API key from [OrcaRouter](https://www.orcarouter.ai), pass it via the `--orcarouter_api_key` argument.
690
690
691
691
### 2.1 Experience via Command Line
692
692
693
693
You can download the [test file](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png) and quickly experience the pipeline effect with a single command:
694
694
695
695
```bash
696
696
paddleocr pp_doctranslation -i vehicle_certificate-1.png --target_language en --qianfan_api_key your_api_key
697
+
698
+
# Use the OrcaRouter OpenAI-compatible gateway via --orcarouter_api_key
699
+
paddleocr pp_doctranslation -i vehicle_certificate-1.png --target_language en --orcarouter_api_key your_api_key
697
700
```
698
701
699
702
The examples above use local Paddle inference engines by default. By default, each module selects the appropriate local Paddle inference engine according to the default model name: models that support only dynamic graph use `paddle_dynamic`, while models that support both static and dynamic graph prefer `paddle_static`. To run them, first install PaddlePaddle by following [PaddlePaddle Framework Installation](../paddlepaddle_installation.en.md).
@@ -1255,6 +1258,12 @@ If not set, the pipeline initialized value will be used, default is <code>True</
1255
1258
<td></td>
1256
1259
</tr>
1257
1260
<tr>
1261
+
<td><code>orcarouter_api_key</code></td>
1262
+
<td><b>Meaning:</b>API key for the [OrcaRouter](https://www.orcarouter.ai) gateway.</td>
1263
+
<td><code>str</code></td>
1264
+
<td></td>
1265
+
</tr>
1266
+
<tr>
1258
1267
<td><code>device</code></td>
1259
1268
<td><b>Meaning:</b>Device used for inference.<br/>
0 commit comments