Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vllm/entrypoints/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ def apply_hf_chat_template(
tools: Optional[list[dict[str, Any]]],
*,
trust_remote_code: bool = False,
tokenize: bool = False, # Different from HF's default
tokenize: bool = True,
**kwargs: Any,
) -> str:
hf_chat_template = resolve_hf_chat_template(
Expand Down
3 changes: 3 additions & 0 deletions vllm/entrypoints/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@
use_tqdm: bool = True,
lora_request: Optional[LoRARequest] = None,
chat_template: Optional[str] = None,
tokenize: bool = True,
chat_template_content_format: ChatTemplateContentFormatOption = "auto",
add_generation_prompt: bool = True,
continue_final_message: bool = False,
Expand Down Expand Up @@ -653,6 +654,7 @@
lora_request: LoRA request to use for generation, if any.
chat_template: The template to use for structuring the chat.
If not provided, the model's default chat template will be used.
tokenize: Whether to tokenize the output. If `False`, the output will be a string.

Check failure on line 657 in vllm/entrypoints/llm.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (E501)

vllm/entrypoints/llm.py:657:81: E501 Line too long (94 > 80)
chat_template_content_format: The format to render message content.

- "string" will render the content as a string.
Expand Down Expand Up @@ -725,6 +727,7 @@
trust_remote_code=model_config.trust_remote_code,
conversation=conversation,
chat_template=chat_template,
tokenize=tokenize,
tools=tools,
add_generation_prompt=add_generation_prompt,
continue_final_message=continue_final_message,
Expand Down
Loading