Skip to content

Conversation

zeecorleone
Copy link

Fixed issue #207.
(Important: PR 208 should be merged. The solution contains build errors inside Test project, which I fixed in that PR separately)

/// <summary>
/// Creates an empty <see cref="ImageInput"/>
/// </summary>
public ImageInput() { }
Copy link
Author

Choose a reason for hiding this comment

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

Added to support deserialization

image = value;
text = null;
Type = "image_url";
if (value != null)
Copy link
Author

Choose a reason for hiding this comment

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

After spending a lot of time, I found that this was the root cause. Values were being overwritten, hence deserialization was breaking. I tried to think of all cases/paths, and it looks fine to me to add this check. @OkGoDoIt , if you can think of anything where this doesn't fit it, let me know.

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.

Error deserializing a ChatMessage
1 participant