File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1252,7 +1252,7 @@ def apply_hf_chat_template(
1252
1252
# investigation.
1253
1253
logger .exception (
1254
1254
"An error occurred in `transformers` while applying chat template" )
1255
- raise ValueError from e
1255
+ raise ValueError ( str ( e )) from e
1256
1256
1257
1257
def apply_mistral_chat_template (
1258
1258
tokenizer : MistralTokenizer ,
@@ -1281,7 +1281,7 @@ def apply_mistral_chat_template(
1281
1281
# We convert those assertion errors to ValueErrors so they can be
1282
1282
# are properly caught in the preprocessing_input step
1283
1283
except (AssertionError , MistralCommonException ) as e :
1284
- raise ValueError from e
1284
+ raise ValueError ( str ( e )) from e
1285
1285
1286
1286
# External library exceptions can sometimes occur despite the framework's
1287
1287
# internal exception management capabilities.
@@ -1292,7 +1292,7 @@ def apply_mistral_chat_template(
1292
1292
logger .exception (
1293
1293
"An error occurred in `mistral_common` while applying chat "
1294
1294
"template" )
1295
- raise ValueError from e
1295
+ raise ValueError ( str ( e )) from e
1296
1296
1297
1297
def random_tool_call_id () -> str :
1298
1298
return f"chatcmpl-tool-{ random_uuid ()} "
You can’t perform that action at this time.
0 commit comments