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

Expose streaming API #31

Open
lpil opened this issue Jul 14, 2024 · 4 comments
Open

Expose streaming API #31

lpil opened this issue Jul 14, 2024 · 4 comments

Comments

@lpil
Copy link
Member

lpil commented Jul 14, 2024

For example, for @hayleigh-dot-dev's chat-bot project

@RobertCraigie
Copy link

RobertCraigie commented Oct 19, 2024

hey I'm also interested in a response body streaming API, did you have a particular design in mind?

Maybe something like this?

pub fn send_stream(req: Request(String)) -> Result(Response(Iterator(BitArray)), Dynamic)

@lpil
Copy link
Member Author

lpil commented Oct 20, 2024

I think it would be message based. Iterators are not suitable for streaming like this.

@RobertCraigie
Copy link

ah I see thanks, would you be able to share an example snippet? I'm new to Gleam so I'm not sure what that would look like exactly

@lpil
Copy link
Member Author

lpil commented Oct 28, 2024

I don't believe anyone has done any research and design on this yet.

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