Initialize the delta tool call fields explicitly (#17340)
Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Co-authored-by: igmainc <igmainc@icloud.com>
This commit is contained in:
committed by
GitHub
parent
7ea6cb28b2
commit
05a4324f8e
@@ -44,6 +44,7 @@ from vllm.transformers_utils.chat_templates import (
|
||||
# yapf: enable
|
||||
from vllm.transformers_utils.processor import cached_get_processor
|
||||
from vllm.transformers_utils.tokenizer import AnyTokenizer, MistralTokenizer
|
||||
from vllm.utils import random_uuid
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
@@ -1272,3 +1273,6 @@ def apply_mistral_chat_template(
|
||||
"An error occurred in `mistral_common` while applying chat "
|
||||
"template")
|
||||
raise ValueError from e
|
||||
|
||||
def random_tool_call_id() -> str:
|
||||
return f"chatcmpl-tool-{random_uuid()}"
|
||||
Reference in New Issue
Block a user