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(
12521252        # investigation. 
12531253        logger .exception (
12541254            "An error occurred in `transformers` while applying chat template" )
1255-         raise  ValueError  from  e 
1255+         raise  ValueError ( str ( e ))  from  e 
12561256
12571257def  apply_mistral_chat_template (
12581258    tokenizer : MistralTokenizer ,
@@ -1281,7 +1281,7 @@ def apply_mistral_chat_template(
12811281    # We convert those assertion errors to ValueErrors so they can be 
12821282    # are properly caught in the preprocessing_input step 
12831283    except  (AssertionError , MistralCommonException ) as  e :
1284-         raise  ValueError  from  e 
1284+         raise  ValueError ( str ( e ))  from  e 
12851285
12861286    # External library exceptions can sometimes occur despite the framework's 
12871287    # internal exception management capabilities. 
@@ -1292,7 +1292,7 @@ def apply_mistral_chat_template(
12921292        logger .exception (
12931293            "An error occurred in `mistral_common` while applying chat " 
12941294            "template" )
1295-         raise  ValueError  from  e 
1295+         raise  ValueError ( str ( e ))  from  e 
12961296
12971297def  random_tool_call_id () ->  str :
12981298    return  f"chatcmpl-tool-{ random_uuid ()}  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments