Skip to content

Commit 993e077

Browse files
committed
fix api_cli
1 parent 230d9d8 commit 993e077

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lightllm/server/api_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def make_argument_parser() -> argparse.ArgumentParser:
128128
parser.add_argument(
129129
"--tool_call_parser",
130130
type=str,
131-
choices=["qwen25", "llama3", "mistral"],
131+
choices=["qwen25", "llama3", "mistral", "deepseekv3", "qwen"],
132132
default=None,
133133
help="tool call parser type",
134134
)

lightllm/server/api_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class ChatMessage(BaseModel):
168168
class ChatCompletionResponseChoice(BaseModel):
169169
index: int
170170
message: ChatMessage
171-
finish_reason: Optional[Literal["stop", "length", "function_call"]] = None
171+
finish_reason: Optional[Literal["stop", "length", "tool_calls"]] = None
172172

173173

174174
class ChatCompletionResponse(BaseModel):

lightllm/server/function_call_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ def __init__(self):
393393
Initializes the detector with necessary state variables.
394394
"""
395395
super().__init__()
396-
self.bot_token = "<tool_call>\n"
397-
self.eot_token = "\n</tool_call>"
398-
self.tool_call_separator = "\n"
396+
self.bot_token = "<tool_call>"
397+
self.eot_token = "</tool_call>"
398+
# self.tool_call_separator = "\n"
399399
self._normal_text_buffer = "" # Buffer for handling partial end tokens
400400

401401
def has_tool_call(self, text: str) -> bool:

0 commit comments

Comments
 (0)