We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 480a49a commit 4f456e7Copy full SHA for 4f456e7
llmfoundry/data/finetuning/tasks.py
@@ -210,7 +210,8 @@ def _validate_chat_formatted_example(example: ChatFormattedDict):
210
raise IncorrectMessageKeyQuantityError(list(message.keys()))
211
if message[role_key] not in _ALLOWED_ROLES:
212
raise InvalidRoleError(message[role_key], _ALLOWED_ROLES)
213
- if not isinstance(message[content_key], str):
+ if not isinstance(message[content_key], (list, str)):
214
+ # this validation check accepts text-only as well as multimodal messages for chat-enabled models
215
raise InvalidContentTypeError(type(message[content_key]))
216
if last_message_role is not None and last_message_role == message[
217
role_key]:
0 commit comments