Skip to content

Commit 203cc1f

Browse files
committed
Fix bug and add glossary (#4318)
1 parent 1707aad commit 203cc1f

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

docs/pipeline_usage/tutorials/ocr_pipelines/PP-DocTranslation.en.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ After executing the above code, you will obtain the parsed results of the origin
13971397
<td>Time interval in seconds for sending requests to the large language model. This parameter can be used to prevent overly frequent calls to the large language model.</td>
13981398
<td><code>float</code></td>
13991399
<td>A floating-point number greater than or equal to 0</td>
1400-
<td><code>0</code></td>
1400+
<td><code>0.0</code></td>
14011401
</tr>
14021402
<tr>
14031403
<td><code>chat_bot_config</code></td>
@@ -1938,17 +1938,17 @@ The following is the API reference for basic Serving and examples of multilingua
19381938
<td>No</td>
19391939
</tr>
19401940
<tr>
1941-
<td><code>chatBotConfig</code></td>
1942-
<td><code>object</code>|<code>null</code></td>
1943-
<td>Refer to the description of the <code>translate</code>method's<code>chat_bot_config</code>parameter in the pipeline object.</td>
1944-
<td>No</td>
1945-
</tr>
1946-
<tr>
19471941
<td><code>llmRequestInterval</code></td>
19481942
<td><code>number</code>|<code>null</code></td>
19491943
<td>Refer to the description of the <code>translate</code>method's<code>llm_request_interval</code>parameter in the pipeline object.</td>
19501944
<td>No</td>
19511945
</tr>
1946+
<tr>
1947+
<td><code>chatBotConfig</code></td>
1948+
<td><code>object</code>|<code>null</code></td>
1949+
<td>Refer to the description of the <code>translate</code>method's<code>chat_bot_config</code>parameter in the pipeline object.</td>
1950+
<td>No</td>
1951+
</tr>
19521952
</tbody>
19531953
</table>
19541954
<ul>

docs/pipeline_usage/tutorials/ocr_pipelines/PP-DocTranslation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,17 +1998,17 @@ for tgt_md_info in tgt_md_info_list:
19981998
<td>否</td>
19991999
</tr>
20002000
<tr>
2001-
<td><code>chatBotConfig</code></td>
2002-
<td><code>object</code> | <code>null</code></td>
2003-
<td>请参阅产线对象中 <code>translate</code> 方法的 <code>chat_bot_config</code> 参数相关说明。</td>
2004-
<td>否</td>
2005-
</tr>
2006-
<tr>
20072001
<td><code>llmRequestInterval</code></td>
20082002
<td><code>number</code> | <code>null</code></td>
20092003
<td>请参阅产线对象中 <code>translate</code> 方法的 <code>llm_request_interval</code> 参数相关说明。</td>
20102004
<td>否</td>
20112005
</tr>
2006+
<tr>
2007+
<td><code>chatBotConfig</code></td>
2008+
<td><code>object</code> | <code>null</code></td>
2009+
<td>请参阅产线对象中 <code>translate</code> 方法的 <code>chat_bot_config</code> 参数相关说明。</td>
2010+
<td>否</td>
2011+
</tr>
20122012
</tbody>
20132013
</table>
20142014
<ul>

paddlex/inference/serving/basic_serving/_pipeline_apps/pp_doctranslation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ async def _translate(
176176
rules_str=request.rulesStr,
177177
few_shot_demo_text_content=request.fewShotDemoTextContent,
178178
few_shot_demo_key_value_list=request.fewShotDemoKeyValueList,
179-
chat_bot_config=request.chatBotConfig,
179+
glossary=request.glossary,
180180
llm_request_interval=request.llmRequestInterval,
181+
chat_bot_config=request.chatBotConfig,
181182
)
182183

183184
translation_results: List[Dict[str, Any]] = []

paddlex/inference/serving/schemas/pp_doctranslation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ class TranslateRequest(BaseModel):
9292
rulesStr: Optional[str] = None
9393
fewShotDemoTextContent: Optional[str] = None
9494
fewShotDemoKeyValueList: Optional[str] = None
95+
glossary: Optional[dict] = None
96+
llmRequestInterval: float = 0.0
9597
chatBotConfig: Optional[dict] = None
96-
sleepInterval: float = 0
9798

9899

99100
class TranslationResult(BaseModel):

0 commit comments

Comments
 (0)