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

[BFCL] Multi Turn Pipeline Robustness Patch #724

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

HuanzhiMao
Copy link
Collaborator

This PR adds checks to prevent unsafe function calls from being run and potentially breaking the evaluation pipeline.

  1. In GorillaFileSytem, the xargs method is removed. This will not affect the dataset entries, and that function is not used in any entries.
  2. In execute_multi_turn_func_call, an input filter has been implemented to prevent the execution of unsafe function calls like kill, exit, remove, etc.

@HuanzhiMao HuanzhiMao added the BFCL-General General BFCL Issue label Oct 29, 2024
@HuanzhiMao HuanzhiMao marked this pull request as ready for review October 29, 2024 07:15
Copy link
Collaborator

@Fanjia-Yan Fanjia-Yan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Corresponding function JSON string is removed #723

Copy link
Collaborator

@CharlieJCJ CharlieJCJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShishirPatil ShishirPatil merged commit b12bc0f into ShishirPatil:main Oct 30, 2024
@HuanzhiMao HuanzhiMao mentioned this pull request Oct 31, 2024
ShishirPatil pushed a commit that referenced this pull request Oct 31, 2024
This PR fixes an issue introduced in #724. We need to preserve the
original `func_call` to avoid errors during evaluation.
`func_call` should be like `xxxx_instance.cd(folder='document')` so that
when `eval(func_call)`, the `cd` method is invoked. Without the patch,
`func_call` would become `cd` and thus resulting in variable not found
error.
@HuanzhiMao HuanzhiMao deleted the eval-patch branch October 31, 2024 12:41
VishnuSuresh27 pushed a commit to VishnuSuresh27/gorilla that referenced this pull request Nov 11, 2024
This PR adds checks to prevent unsafe function calls from being run and
potentially breaking the evaluation pipeline.

1. In GorillaFileSytem, the `xargs` method is removed. This will not
affect the dataset entries, and that function is not used in any
entries.
2. In `execute_multi_turn_func_call`, an input filter has been
implemented to prevent the execution of unsafe function calls like
`kill`, `exit`, `remove`, etc.

---------

Co-authored-by: Shishir Patil <30296397+ShishirPatil@users.noreply.github.com>
VishnuSuresh27 pushed a commit to VishnuSuresh27/gorilla that referenced this pull request Nov 11, 2024
This PR fixes an issue introduced in ShishirPatil#724. We need to preserve the
original `func_call` to avoid errors during evaluation.
`func_call` should be like `xxxx_instance.cd(folder='document')` so that
when `eval(func_call)`, the `cd` method is invoked. Without the patch,
`func_call` would become `cd` and thus resulting in variable not found
error.
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.

4 participants