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

Chain conversation: ability to send a message and receive a stream feature request #231

Open
JohnTheCoolingFan opened this issue Oct 30, 2023 · 2 comments

Comments

@JohnTheCoolingFan
Copy link
Contributor

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.

@JohnTheCoolingFan 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
@JohnTheCoolingFan
Copy link
Contributor Author

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.

@LUK3ARK
Copy link

LUK3ARK commented Nov 23, 2023

Hey @JohnTheCoolingFan did you have any luck with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants