Replies: 1 comment
-
It'll serialize correctly, but the de-serialization will not work automatically? If we expose to the user control over the serializer, the user will be able to take care of de-serialization as well |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Making some tests I noticed that Pydantic objects included in dictionaries passing through a chain produce an error when the
astream_log
is used on a RemoteRunnable.An easy workaround is to use
model_dump
in the chain to transform it in to a dictionary, and move it along the chain, or to change it in a dataclass or any other data structure that is supported byorjson.dump()
.However, in my opinion, the best solution would be to add a direct support for Pydantic model serialization, given their widespread usage, even more in this kind of applications, where the validation of payloads / data is crucial.
I think this issue could be considered related to #413, but I decided to open a discussion instead since I don't think it's an issue by itself
Beta Was this translation helpful? Give feedback.
All reactions