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

Better serialization format for the new ChatMessage #8740

Open
LastRemote opened this issue Jan 17, 2025 · 0 comments
Open

Better serialization format for the new ChatMessage #8740

LastRemote opened this issue Jan 17, 2025 · 0 comments
Labels
P3 Low priority, leave it in the backlog

Comments

@LastRemote
Copy link
Contributor

LastRemote commented Jan 17, 2025

Is your feature request related to a problem? Please describe.
Following the leftover comment from #8640 (comment)

Describe the solution you'd like
ChatMessage serialization/deserialization should not use underscores in its json format.

It makes much more sense to write

{"chat_history": [{"role": "user", "content": [...]}, {"role": "assistant", "content": [...], "meta": {...}}]}

rather than

{"chat_history": [{"_role": "user", "_content": [...]}, {"_role": "assistant", "_content": [...], "_meta": {...}}]}

as the serialized input of a pipeline.

The internal parameters of the new ChatMessage class (e.g. _content) can be left unchanged.

Describe alternatives you've considered
Leave as it is: I am very unhappy about adding these extra underscores as a part of the request to my currently deployed pipelines. No matter the parameters are internal or not, the changes should not extend to its serialized form.

Additional context
I put a comment in the PR (#8640) before it was merged but it still slipped through despite multiple pings. I am a little disappointed to be very honest and I hope the communication could have been a little clearer.

@julian-risch julian-risch added the P3 Low priority, leave it in the backlog label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority, leave it in the backlog
Projects
None yet
Development

No branches or pull requests

2 participants