You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Chain::send_message forces the output to be of Immediate type, which is not suitable for my use.
Perhaps a method that doesn't consume the stream but instead makes a different stream, one which also collects the streaming output and appends to the history? async-stream crate might be helpful with that.
The text was updated successfully, but these errors were encountered:
JohnTheCoolingFan
changed the title
Chain conversation: ability to send a message and receive a stream feqture request
Chain conversation: ability to send a message and receive a stream feature request
Nov 1, 2023
After trying to impleemnt this myself in a way that would be nice, I came to a conclusion that this is not possible with the current design of the api. I'll reuse the code of Chain in my project but will adjust it the way I need it to work.
Also, why put Output as the return type of send_message if it always returns Output::Immediate?.. Just return the underlying type without being ambigious that the stream is always consumed and turned into an immediate response.
Currently
Chain::send_message
forces the output to be ofImmediate
type, which is not suitable for my use.Perhaps a method that doesn't consume the stream but instead makes a different stream, one which also collects the streaming output and appends to the history?
async-stream
crate might be helpful with that.The text was updated successfully, but these errors were encountered: