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

[BUGFIX] serialize-chat-fields #5553

Merged
merged 5 commits into from
Oct 2, 2024
Merged

Conversation

burtenshaw
Copy link
Contributor

Description

Closes #<issue_number>

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)
  • Documentation update

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@burtenshaw burtenshaw added this to the v2.3.0 milestone Oct 1, 2024
@burtenshaw burtenshaw requested a review from frascuchon October 2, 2024 10:16
Comment on lines +305 to +314
for key, value in self.items():
if value is None:
continue
elif self._is_image(key):
fields[key] = cast_image(value)
elif self._is_chat(key):
fields[key] = [message.model_dump() if not isinstance(message, dict) else message for message in value]
else:
fields[key] = value
return fields
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to review all the serialization logic when addressing #4944.

We have a serialization logic broken down by the code and we are not sure which will apply for each case.

@frascuchon frascuchon self-requested a review October 2, 2024 10:49
@frascuchon frascuchon merged commit de5085d into develop Oct 2, 2024
6 of 7 checks passed
@frascuchon frascuchon deleted the fix/serialize-chat-fields branch October 2, 2024 12:11
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.

2 participants