Selaa lähdekoodia

update pp-chatocrv3 usage doc and warning log

zhouchangda 1 vuosi sitten
vanhempi
commit
51693bdbf9

+ 1 - 1
docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction.md

@@ -233,7 +233,7 @@ chat_result.print()
 |`pipeline`|str|无|产线名称或是产线配置文件路径,如为产线名称,则必须为 PaddleX 所支持的产线;|
 |`llm_name`|str|"ernie-3.5"|大语言模型名称,目前支持`ernie-4.0`,`ernie-3.5`,更多模型支持中;|
 |`llm_params`|dict|`{}`|LLM相关API配置;|
-|`device`|str、None|`None`|运行设备(`None`为自动适配);|
+|`device`|str、None|`None`|运行设备(`None`为自动适配),支持传入'cpu','gpu'或'gpu:0'等;|
 
 (2)调用文档场景信息抽取v3产线对象的 `visual_predict` 方法进行视觉推理预测,相关参数说明如下:
 

+ 1 - 2
docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_en.md

@@ -229,7 +229,7 @@ In the above Python script, the following steps are executed:
 | `pipeline` | str | None | Pipeline name or pipeline configuration file path. If it's a pipeline name, it must be supported by PaddleX; |
 | `llm_name` | str | "ernie-3.5" | Large Language Model name, we support `ernie-4.0` and `ernie-3.5`, with more models on the way.|
 | `llm_params` | dict | `{}` | API configuration; |
-| `device(kwargs)` | str/`None` | `None` | Running device (`None` meaning automatic selection); |
+| `device(kwargs)` | str/`None` | `None` | Running device, support `cpu`, `gpu`, `gpu:0`, etc. `None` meaning automatic selection; |
 
 (2) Call the `visual_predict` of the PP-ChatOCRv3-doc pipeline object to visual predict, related parameters descriptions are as follows:
 
@@ -721,4 +721,3 @@ pipeline = create_pipeline(
 ```
 
 If you want to use the PP-ChatOCRv3-doc Pipeline on more types of hardware, please refer to the [PaddleX Multi-Device Usage Guide](../../../other_devices_support/multi_devices_use_guide_en.md).
-

+ 1 - 1
paddlex/inference/components/llm/erniebot.py

@@ -166,7 +166,7 @@ class ErnieBot(BaseLLM):
         """caculate similar with key and doc"""
         if not self.is_vector_store(vector):
             logging.warning(
-                "The retrieved vectorstore is not for PaddleX and will return vectorstore directly"
+                "The retrieved vectorstore is not for PaddleX and will return the visual results of the query image"
             )
             return vector
         # XXX: The initialization parameters are hard-coded.