Closed ftp27 closed 1 year ago
@ftp27 You're essentially trying to reduce the Stream of content? The streaming API uses ChatStream.Choice.Message
over Chat.Message
. Would it make more sense to add it there, or extend the AsyncStream with a custom reduce method?
@dylanshine It's just a setter for the content
variable. It does not disrupt any logic associated with ChatStream.Choice
. Since you already have a getter for the content
variable, it makes sense also to have a setter.
I believe that this feature can be quite useful, particularly when using the stream for response and preserving the original structures from the framework to display chat in UI. With this feature, whenever a new update is received, you can simply add the new content to the previous message. Anyway, it's just a suggestion to improve usability.