Skip to content

Streaming support for openAI's online requests #693

Open
lyuwen wants to merge 5 commits into
bespokelabsai:mainfrom
lyuwen:feature/openai-stream-response
Open

Streaming support for openAI's online requests #693
lyuwen wants to merge 5 commits into
bespokelabsai:mainfrom
lyuwen:feature/openai-stream-response

Conversation

@lyuwen

@lyuwen lyuwen commented Jun 26, 2025

Copy link
Copy Markdown

As addressed in #692 , the PR adds stream response support for openAI's online request processor.

Closes #692

@kartik4949

Copy link
Copy Markdown
Contributor

@lyuwen Hello, thanks for the pr, could you let me know how to reproduce this?
which model and provider you used?

we have a similar setup and using longlived_response to flag deepseek model, where we are concatenating empty responses (deepseek sends these responses to maintain the connection) and get the reasoning response as joined.

@lyuwen

lyuwen commented Jun 30, 2025

Copy link
Copy Markdown
Author

I'm using a third party provider (alibabacloud) that hosts DeepSeek-R1 model. So the url check that activates the longlived_response would not work in this case. And it seems the MaaS provider does not send empty responses in non-stream mode and I would get a lot of timeout errors. After discussing with them, they recommended us to turn on stream.

@kartik4949

Copy link
Copy Markdown
Contributor

@lyuwen got it makes sense, ill try to update it the code, however I need to somehow reproduce this as an integration test.
is it possible for you to check integration test and add one?
we use VCR, once you create the cassette file, you can redact all keys from the file.

let me know if this is not possible, Ill need to find other solution meanwhile for testing.

@kartik4949

Copy link
Copy Markdown
Contributor

@lyuwen
https://github.com/lyuwen/curator/pull/1/files
please merge this into your branch and we should be good, ill create a follow up pr for tests.
Thanks

@lyuwen

lyuwen commented Jun 30, 2025

Copy link
Copy Markdown
Author

Thanks. I've merged your pr. And I'll take a look at testing.

@lyuwen

lyuwen commented Jul 1, 2025

Copy link
Copy Markdown
Author

I've just uploaded a cassette file for reproducing the case.

@lyuwen

lyuwen commented Jul 1, 2025

Copy link
Copy Markdown
Author

I just added a test that uses the mock reasoning dataset.

@kartik4949

Copy link
Copy Markdown
Contributor

@lyuwen could you check makefile in this repository
before commit just do this.

make lint
make check

@lyuwen

lyuwen commented Jul 3, 2025

Copy link
Copy Markdown
Author

@lyuwen could you check makefile in this repository before commit just do this.

make lint
make check

After I ran these commands. There are a few files I haven't touched got changed. I only kept track of the ones that I modified.

@lyuwen lyuwen force-pushed the feature/openai-stream-response branch from 884cbdf to c4ee83c Compare July 3, 2025 01:28
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.

Streaming support for openAI's online requests

2 participants