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] Bugs in decode executable predictions #652

Closed
XuHwang opened this issue Sep 23, 2024 · 1 comment · Fixed by #660
Closed

[BFCL] Bugs in decode executable predictions #652

XuHwang opened this issue Sep 23, 2024 · 1 comment · Fixed by #660

Comments

@XuHwang
Copy link
Contributor

XuHwang commented Sep 23, 2024

Describe the issue
BFCLv3 has modified the decode logic for executable predictions, while I found there are a lot of cases in REST category that could not be decoded by current method.

For example, here is one example:

result="[requests.get(url=\"https://covid-193.p.rapidapi.com/statistics\", headers={\"X-RapidAPI-Key\": \"xxxxxxx\", \"X-RapidAPI-Host\": \"covid-193.p.rapidapi.com\"}, timeout=5, params={\"country\": \"China\"})]"

It would be parsed by decoded_output_to_execution_list function.

Then the nested value {"X-RapidAPI-Key": "xxxxxxx", "X-RapidAPI-Host": \"covid-193.p.rapidapi.com"} would be parsed by parse_nested_value, which would raise error "str object has no attribute .items()"

In summary, this logic only consider the case that the nested value is a sub function while ignoring the truth that the argument type is just a dict.

ID datapoint

  1. Datapoint / Model Handler permalink:
  2. Issue:
  3. Gorilla repo commit #:

What is the issue

Proposed Changes

{
'previous_datapoint':[],
'updated_datapoint':[]
}

Additional context
Add any other context about the problem here.

@HuanzhiMao
Copy link
Collaborator

Hi @XuHwang,

Thanks for pointing this out. This is indeed an oversight on our end. We will push a patch for this.

dyang415 pushed a commit to empower-ai/gorilla that referenced this issue Sep 30, 2024
…hishirPatil#660)

In the parse_nested_value function, added a check to determine whether
we are dealing with another function call or if its a regular
dictionary. Previous version of the code incorrectly assumed that this
was always a function call and did not consider the case where the
function argument is a dictionary.

Fix ShishirPatil#652

---------

Co-authored-by: Huanzhi (Hans) Mao <huanzhimao@gmail.com>
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 a pull request may close this issue.

2 participants