Skip to content

[Feature] Add partial support for parrallel_tool_calls in Funcation Calling API#2576

Closed
HaoyuWang4188 wants to merge 8 commits intosgl-project:mainfrom
HaoyuWang4188:func_call_streaming
Closed

[Feature] Add partial support for parrallel_tool_calls in Funcation Calling API#2576
HaoyuWang4188 wants to merge 8 commits intosgl-project:mainfrom
HaoyuWang4188:func_call_streaming

Conversation

@HaoyuWang4188
Copy link
Copy Markdown
Contributor

@HaoyuWang4188 HaoyuWang4188 commented Dec 25, 2024

Update: To avoid conflict with #2700, change this PR to be a support PR for parrallel_tool_calls. As discussed in #2700 (comment), we always set parrallel_tool_calls=false and align the behaviour of all models to output only one tool_call in single turn.

This PR adds partial support for parrallel_tool_calls (set parrallel_tool_calls always to be false).

This is still a draft for streaming API. And it should be a follow-up PR and should be merged after #2544

Motivation

Modifications

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@merrymercy
Copy link
Copy Markdown
Contributor

@HaoyuWang4188 Can you rebase, support the streaming and add test cases?

@HaoyuWang4188
Copy link
Copy Markdown
Contributor Author

@HaoyuWang4188 Can you rebase, support the streaming and add test cases?

Sure, notice that #2544 is merged. I will rebase this PR and commit the required changes ASAP.

@Tushar-ml
Copy link
Copy Markdown
Contributor

There is one more PR going on for this functionality: #2700

@merrymercy
Copy link
Copy Markdown
Contributor

@HaoyuWang4188 @Tushar-ml @YAMY1234 Can you review each other's code?

@HaoyuWang4188
Copy link
Copy Markdown
Contributor Author

There is one more PR going on for this functionality: #2700

Sure, I will review #2700 and discuss with the author in slack.

@HaoyuWang4188 HaoyuWang4188 marked this pull request as ready for review January 8, 2025 07:30
@HaoyuWang4188 HaoyuWang4188 changed the title [Feature] Streaming API for Function Calling [Feature] Add partial support for parrallel_tool_calls in Funcation Calling API Jan 8, 2025
@HaoyuWang4188 HaoyuWang4188 force-pushed the func_call_streaming branch 2 times, most recently from 1cd1b2d to 7d62915 Compare January 8, 2025 08:27
@blueyo0
Copy link
Copy Markdown

blueyo0 commented Jan 8, 2025

@merrymercy @Ying1123 Would you help review this PR? The results of requested review in comments can be found in #2700. Many thanks!

@HaoyuWang4188
Copy link
Copy Markdown
Contributor Author

Fix the conflict and re-run the CI.

Would @shuaills @zhaochenyang20 help review the PR and decide whether to merge it or close it if we don't need it anymore? This PR is a patch to align the behavior of the option parrallel_tool_calls in function calling API. The previous discussions can be found in post1 and suggested changes. Thanks for your time.

@zhaochenyang20
Copy link
Copy Markdown
Collaborator

@HaoyuWang4188 Sorry. I am busy today and will ask Shuai to help.

@shuaills
Copy link
Copy Markdown
Collaborator

@HaoyuWang4188 Hi, #2700 has been updated, so this pr might not be applicable with the updated code base. Would you like to join our Slack and have a detailed discussion?

@HaoyuWang4188
Copy link
Copy Markdown
Contributor Author

@HaoyuWang4188 Hi, #2700 has been updated, so this pr might not be applicable with the updated code base. Would you like to join our Slack and have a detailed discussion?

Post my opinions in Slack. We can discuss in the post. 😺

@merrymercy
Copy link
Copy Markdown
Contributor

@zhaochenyang20 merge this?

@zhaochenyang20
Copy link
Copy Markdown
Collaborator

@merrymercy This has conflicts in our developed map of function calling and we are still discussing this.

@HaoyuWang4188
Copy link
Copy Markdown
Contributor Author

Close this PR and will open a new one to support parrallel_tool_calls based on #2700 after Chinese New Year.

@zhaochenyang20
Copy link
Copy Markdown
Collaborator

Thanks for helping on this. Happy Chinese New Year! We will work on it later @HaoyuWang4188.

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.

7 participants