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

add a struct to transform EventSource stream into OpenAI response stream #121

Closed
wants to merge 2 commits into from

Conversation

ifsheldon
Copy link
Contributor

@ifsheldon ifsheldon commented Oct 15, 2023

Hey, this is my attempt to remove tokio in stream() to further resolve #102 . I think pub(crate) async fn stream<O> is basically doing stream transformation and early stopping, so I wrap the transformation into a struct instead.

I don't have time to test it yet (sorry about that), but it did compile lol, so this should be considered as a draft PR. If you can help test it, it'd be great. Thanks!

@ifsheldon
Copy link
Contributor Author

I've tested it using Azure OpenAI service and it seems good to me, but I don't have a OpenAI key

@ifsheldon ifsheldon mentioned this pull request Oct 16, 2023
@ifsheldon
Copy link
Contributor Author

closing this as it's merged into #122

@ifsheldon ifsheldon closed this Oct 22, 2023
@ifsheldon ifsheldon deleted the stream_transformation branch November 26, 2023 08:01
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

Successfully merging this pull request may close these issues.

Wasm support
1 participant