Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Serialization Warnings for Image or File Uploads in Models #12114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kiedeng
Copy link

@kiedeng kiedeng commented Dec 26, 2024

Summary

When uploading files or documents directly to a large model, serialization warnings may occur due to type mismatches. This happens because, in Pydantic v2, the model_dump method expects strict type matching for fields.Currently, the type is explicitly defined as List, so using List reduces potential type mismatch issues and improves code readability.

Usage Location:
image

Warning Screenshot:
warning

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ⚙️ feat:model-runtime labels Dec 26, 2024
@crazywoola crazywoola requested a review from laipz8200 January 3, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ feat:model-runtime size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant