Skip to content

[BFCL] Omit Reasoning Content from Chat History for Function-Calling Models #1064

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

Merged
merged 4 commits into from
Jun 13, 2025

Conversation

HuanzhiMao
Copy link
Collaborator

OpenAI models do not return reasoning content within API responses. However, other models using the OpenAI-compatible interface, such as DeepSeek, include reasoning details in their responses.

These reasoning contents are typically not intended for inclusion in subsequent chat turns. This PR addresses this behavior by updating the handler to store any available reasoning content into response_data (primarily for local result logging), while ensuring that reasoning content does not propagate into the chat history.

This approach has previously been implemented for prompt-based models. This PR extends that logic to also support function-calling models.

@HuanzhiMao HuanzhiMao added the BFCL-General General BFCL Issue label Jun 13, 2025
@HuanzhiMao HuanzhiMao merged commit b6e8dfd into ShishirPatil:main Jun 13, 2025
HuanzhiMao added a commit that referenced this pull request Jun 15, 2025
This PR updates the leaderboard to reflect the change in score due to
the following PR merge:

1. #1014 
2. #1031 
3. #1015 
4. #1033 
5. #1040 
6. #1017 
7. #1061 
8. #1056 
9. #1064 
10. #1032 

Models were evaluated using checkpoint commit 1bb65c9.
TheFloatingString added a commit to TheFloatingString/gorilla-fork that referenced this pull request Jun 20, 2025
* origin:
  [BFCL] Fix prompt concatenation bug in Qwen template (ShishirPatil#1068)
  [BFCL] Multi-turn TravelAPI book_flight() Fix (ShishirPatil#966)
  _get_item() can not handle the "." directory in path string (ShishirPatil#1060)
  Add support for llama-3.1-nemotron-ultra-253b-v1 to BFCL (ShishirPatil#1032)
  [BFCL] Omit Reasoning Content from Chat History for Function-Calling Models (ShishirPatil#1064)
  [BFCL] Add support for Ling-Lite-V1.5  (ShishirPatil#1056)
  [BFCL] Added support for DeepSeek-R1-0528 and DeepSeek-V3-0324 (ShishirPatil#1063)
  [BFCL] Add type hinting (ShishirPatil#1058)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFCL-General General BFCL Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants