Open fairjm opened 2 weeks ago
I've noticed that ChatRequestSystemMessage, ChatRequestAssistantMessage and other similar message types all lose their internal state during deserialization. Is the API design of ChatRequest messages not intended for deserialization?
Thanks for reporting this @fairjm, @mssfang or @jpalvarezl could you looking into this and response
Describe the bug ChatRequestUserMessage loses its internal state during deserialization. The following fields are set to null:
When these fields are null, subsequent requests fail.
To Reproduce
it will output:
Code Snippet Add the code snippet that causes the issue.
Expected behavior
Screenshots If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
During serialization, the internal
stringContent
andchatMessageContentItems
fields are used. However, during deserialization, these internal states are not set properly. As a result, after one round of deserialization and serialization, the content is completely lost. This bug has existed for a long time.Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report