Skip to content

Commit cc22826

Browse files
DIYer22Isotr0py
authored andcommitted
[Frontend] Fix multiple values for keyword argument error (vllm-project#10075) (vllm-project#10076)
Signed-off-by: Lei <ylxx@live.com> Signed-off-by: Isotr0py <2037008807@qq.com>
1 parent e253590 commit cc22826

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

vllm/entrypoints/openai/serving_engine.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -443,29 +443,28 @@ async def _preprocess_chat(
443443
tokenizer,
444444
)
445445

446+
_chat_template_kwargs: Dict[str, Any] = dict(
447+
chat_template=chat_template,
448+
add_generation_prompt=add_generation_prompt,
449+
continue_final_message=continue_final_message,
450+
tools=tool_dicts,
451+
documents=documents,
452+
)
453+
_chat_template_kwargs.update(chat_template_kwargs or {})
454+
446455
request_prompt: Union[str, List[int]]
447456
is_mistral_tokenizer = isinstance(tokenizer, MistralTokenizer)
448457
if is_mistral_tokenizer:
449458
request_prompt = apply_mistral_chat_template(
450459
tokenizer,
451460
messages=messages,
452-
chat_template=chat_template,
453-
add_generation_prompt=add_generation_prompt,
454-
continue_final_message=continue_final_message,
455-
tools=tool_dicts,
456-
documents=documents,
457-
**(chat_template_kwargs or {}),
461+
**_chat_template_kwargs,
458462
)
459463
else:
460464
request_prompt = apply_hf_chat_template(
461465
tokenizer,
462466
conversation=conversation,
463-
chat_template=chat_template,
464-
add_generation_prompt=add_generation_prompt,
465-
continue_final_message=continue_final_message,
466-
tools=tool_dicts,
467-
documents=documents,
468-
**(chat_template_kwargs or {}),
467+
**_chat_template_kwargs,
469468
)
470469

471470
mm_data = await mm_data_future

0 commit comments

Comments
 (0)