mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[Feature] Unify the registration name recognition for tool_parser and reasoning_parser to “-” (#4668)
* parser register name unify * change ernie_x1 to ernie-x1 * change ernie4_5_vl to ernie-45-vl * fix unit test
This commit is contained in:
@@ -101,7 +101,7 @@ def limit_thinking_content_length(
|
||||
line_break_id: int = None,
|
||||
):
|
||||
if limit_strategy == "</think>":
|
||||
# for ernie4_5_vl
|
||||
# for ernie-45-vl
|
||||
limit_thinking_content_length_v1(
|
||||
sampled_token_ids,
|
||||
max_think_lens,
|
||||
@@ -110,7 +110,7 @@ def limit_thinking_content_length(
|
||||
think_end_id,
|
||||
)
|
||||
elif limit_strategy == "\n</think>\n\n":
|
||||
# for ernie_x1
|
||||
# for ernie-x1
|
||||
assert line_break_id > 0
|
||||
limit_thinking_content_length_v2(
|
||||
sampled_token_ids,
|
||||
@@ -136,7 +136,7 @@ def speculate_limit_thinking_content_length(
|
||||
line_break_id: int = None,
|
||||
):
|
||||
if limit_strategy == "</think>":
|
||||
# for ernie4_5_vl
|
||||
# for ernie-45-vl
|
||||
speculate_limit_thinking_content_length_v1(
|
||||
accept_tokens,
|
||||
max_think_lens,
|
||||
@@ -147,7 +147,7 @@ def speculate_limit_thinking_content_length(
|
||||
think_end_id,
|
||||
)
|
||||
elif limit_strategy == "\n</think>\n\n":
|
||||
# for ernie_x1
|
||||
# for ernie-x1
|
||||
assert line_break_id > 0
|
||||
speculate_limit_thinking_content_length_v2(
|
||||
accept_tokens,
|
||||
|
||||
Reference in New Issue
Block a user