Skip to content

Update docstring about tool messages in prepare_multimodal_messages#5476

Merged
albertvillanova merged 1 commit intohuggingface:mainfrom
albertvillanova:fu-5440-1
Apr 8, 2026
Merged

Update docstring about tool messages in prepare_multimodal_messages#5476
albertvillanova merged 1 commit intohuggingface:mainfrom
albertvillanova:fu-5440-1

Conversation

@albertvillanova
Copy link
Copy Markdown
Member

@albertvillanova albertvillanova commented Apr 8, 2026

Update docstring about tool messages in prepare_multimodal_messages.

Note that after #5440, messages with "tool" role are prepared for multimodal, but the docstring was not updated.

This PR includes a minor documentation update to the prepare_multimodal_messages function. The change removes a no longer applicable note about handling "tool_calls" and "tool" role in the function's docstring.

Follow-up to:

Changes

  • Documentation update:
    • Removed a docstring note stating that "tool_calls" in "assistant" turns and "tool" roles with "content" and "name" are left as-is, as these do not require special handling for multimodal data. (trl/data_utils.py)

Note

Low Risk
Docstring-only change with no runtime behavior impact.

Overview
Updates the prepare_multimodal_messages docstring in trl/data_utils.py by removing an outdated note claiming tool_calls/tool role messages are left untouched during multimodal preparation.

Reviewed by Cursor Bugbot for commit 84e70e1. Bugbot is set up for automated code reviews on this repo. Configure here.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova merged commit 14deadd into huggingface:main Apr 8, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants