Skip to content

Commit 91e57d0

Browse files
authored
Pass kwargs to chat_template.messages2prompt (#3982)
1 parent 8095307 commit 91e57d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lmdeploy/serve/async_engine.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,8 @@ async def _get_prompt_input(self,
625625
sequence_start,
626626
tools=tools,
627627
enable_thinking=enable_thinking,
628-
reasoning_effort=reasoning_effort)
628+
reasoning_effort=reasoning_effort,
629+
**kwargs)
629630
if prompt is None:
630631
raise ValueError(
631632
f'You are using base template to handle chat task. Please specify a `--chat-template` name chosen from `lmdeploy list` if you want to use OpenAI messages input.' # noqa
@@ -733,7 +734,8 @@ async def generate(
733734
adapter_name,
734735
tools=tools,
735736
reasoning_effort=reasoning_effort,
736-
enable_thinking=enable_thinking)
737+
enable_thinking=enable_thinking,
738+
**kwargs)
737739
prompt = prompt_input['prompt']
738740
input_ids = prompt_input['input_ids']
739741
self.request_logger.log_inputs(session_id=session_id,

0 commit comments

Comments
 (0)