Explicitly set return_dict for apply_chat_template (#33372)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -70,6 +70,7 @@ class DeepseekV32Renderer(RendererLike):
|
||||
content_format="string",
|
||||
)
|
||||
|
||||
kwargs["return_dict"] = False
|
||||
prompt_raw = tokenizer.apply_chat_template(
|
||||
conversation=conversation,
|
||||
messages=messages,
|
||||
@@ -100,6 +101,7 @@ class DeepseekV32Renderer(RendererLike):
|
||||
content_format="string",
|
||||
)
|
||||
|
||||
kwargs["return_dict"] = False
|
||||
prompt_raw = tokenizer.apply_chat_template(
|
||||
conversation=conversation,
|
||||
messages=messages,
|
||||
|
||||
@@ -70,6 +70,7 @@ class Grok2Renderer(RendererLike):
|
||||
content_format="string",
|
||||
)
|
||||
|
||||
kwargs["return_dict"] = False
|
||||
prompt_raw = tokenizer.apply_chat_template(
|
||||
conversation=conversation,
|
||||
messages=messages,
|
||||
@@ -100,6 +101,7 @@ class Grok2Renderer(RendererLike):
|
||||
content_format="string",
|
||||
)
|
||||
|
||||
kwargs["return_dict"] = False
|
||||
prompt_raw = tokenizer.apply_chat_template(
|
||||
conversation=conversation,
|
||||
messages=messages,
|
||||
|
||||
@@ -465,6 +465,7 @@ def safe_apply_chat_template(
|
||||
chat_template=chat_template,
|
||||
chat_template_kwargs=kwargs,
|
||||
)
|
||||
resolved_kwargs["return_dict"] = False
|
||||
|
||||
try:
|
||||
return tokenizer.apply_chat_template(
|
||||
|
||||
Reference in New Issue
Block a user