Skip to content

It'd be nice if there was an extension method on IAsyncEnumerable<ModelContent> to get non-stream result #3949

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

Closed
matthewbolanos opened this issue Dec 4, 2023 · 1 comment
Labels

Comments

@matthewbolanos
Copy link
Member

matthewbolanos commented Dec 4, 2023

In this example, I've shown how it'd be nice to get the final result without having to create the final object myself.

image

Since this is what the alternative looks like...
image

@shawncal shawncal added the triage label Dec 4, 2023
@RogerBarreto
Copy link
Member

RogerBarreto commented Dec 5, 2023

I thought on something similar to this when I did the Streaming brainstorm, but that would be a overkill at the time.

Basically, the connectors services could provide a method builder where they could use the streaming input to create the non-streaming content.

But the point of having a streaming in first place is that you can update your side the way you want while you still don't have the full object, for scenarios you want the full object, the other API is the place.

So, a valid example would be one where you actually Console.Write the output while building the object, and for that matter, only you know the details of your environment to update as the stream comes and we can't know that.

Looking forward to a scenario where this builder is justified where the non-streaming APIs don't already fit.

@matthewbolanos matthewbolanos closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants