Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions trl/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def prepare_multimodal_messages(messages: list[dict[str, Any]], images: list | N
the function transforms them into the structured format by wrapping text in `{"type": "text", "text": ...}`
and inserting `{"type": "image"}` placeholders for the images *before* the first user message.
If the number of placeholders does not match the number of provided images, an error is raised.
- When the input `messages` contains either `"tool_calls"` in the `"assistant"` turns, or `"tool"` roles with
`"content"` and `"name"` those are left as-is, since those don't require any specific handling for multimodal data.

Example:
```python
Expand Down
Loading