yuzaa commited on
Commit
c1a6986
·
verified ·
1 Parent(s): 343b490

Update modeling_minicpmv.py

Browse files
Files changed (1) hide show
  1. modeling_minicpmv.py +1 -3
modeling_minicpmv.py CHANGED
@@ -394,9 +394,7 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
394
  for i, msg in enumerate(copy_msgs):
395
  role = msg["role"]
396
  content = msg["content"]
397
- assert role in ["user", "assistant"]
398
- if i == 0:
399
- assert role == "user", "The role of first msg should be user"
400
  if isinstance(content, str):
401
  content = [content]
402
  cur_msgs = []
 
394
  for i, msg in enumerate(copy_msgs):
395
  role = msg["role"]
396
  content = msg["content"]
397
+ assert role in ["system", "user", "assistant"]
 
 
398
  if isinstance(content, str):
399
  content = [content]
400
  cur_msgs = []