[Frontend] OpenAI Responses API supports Tool/Function calling with streaming#29947
Conversation
88ae555 to
3b2fef1
Compare
|
@chaunceyjiang just wondering if this PR will be merged in soon. I’m really looking forward to this feature! 🙂 |
|
Can I help expedite this in some way? |
|
@chaunceyjiang hello, Could you please let me know roughly when this PR will be merged? I'm really looking forward to it. |
|
I’ll push this forward this week. @SaltFish11 @Dorsivan @loganlebanoff |
0533f27 to
40fdef8
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
I rebased this PR on v0.14.0, but encountered errors when applying it to the actual production scenario. the event stype is not match to openai (https://platform.openai.com/docs/api-reference/responses-streaming) |
40fdef8 to
cc33f42
Compare
cc33f42 to
17c4ce7
Compare
|
@chaunceyjiang hello, any update on this? |
17c4ce7 to
28a6ad3
Compare
|
Hi @chaunceyjiang, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
|
||
| @pytest.mark.asyncio | ||
| @pytest.mark.parametrize("model_name", [MODEL_NAME]) | ||
| async def test_function_calling_with_streaming_expected_arguments( |
There was a problem hiding this comment.
nit: should we move all the logic of this file into tests/entrypoints/openai/responses/test_simple.py?
non blocking: technically this file should be called test_simple_context_function_call.py while we haven't merged parsableContext with simpleContext
There was a problem hiding this comment.
nit: should we move all the logic of this file into tests/entrypoints/openai/responses/test_simple.py?
non blocking: technically this file should be called test_simple_context_function_call.py while we haven't merged parsableContext with simpleContext
I agree. However, when I tried to move these tests there, I found that the vllm serve in test_simple.py does not enable tool-calling.
So I decided to keep them in this file for now. We can reorganize these tests during the next refactor. What do you think?
| delta_text = current_text | ||
| delta_token_ids = current_token_ids | ||
|
|
||
| delta_message = tool_parser.extract_tool_calls_streaming( |
There was a problem hiding this comment.
non blocking thought for the future: maybe I could try to move this logic into Parser() also. right now the streaming logic is such that a tool call can't be output before reasoning; maybe in the future models would want that with interleaved reasoning etc
qandrew
left a comment
There was a problem hiding this comment.
thanks for putting this together, it will be super helpful!! just some minor comments
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…treaming Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
34183f9 to
8a96907
Compare
|
@DarkLight1337 PTAL. |
DarkLight1337
left a comment
There was a problem hiding this comment.
I am not really that familiar with tool calling code but I don't see any immediate issues with this, so stamping.
Purpose
OpenAI Responses API supports Tool/Function calling with streaming
Test Plan
Test Result
with out Reasoning
with Reasoning
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.