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

如果用户的一句message包含多个Function Call name,自带的推理代码是否支持识别 #3893

Closed
1 task done
DDYuudachi opened this issue May 24, 2024 · 1 comment
Labels
wontfix This will not be worked on

Comments

@DDYuudachi
Copy link

DDYuudachi commented May 24, 2024

Reminder

  • I have read the README and searched the existing issues.

Reproduction

微调的模型基座: QWen1.5-7b-Base
使用的数据集: glaive_toolcall_en, glaive_toolcall_zh
使用的推理代码:tests/test_toolcall.py

Expected behavior

我对项目自带的function call数据进行了微调训练,微调后的大模型确实能准确返回function name了。

然后我在推理代码中做了下修改,在tools里写了10个function的schema,这个是其中一个推理后返回的值
Function(arguments='{"customer_name": "test", "product_name": "laptop", "quantity": 1, "unit_price": 6000}', name='generate_invoice')

但是如果我发给模型的message包含了2个或以上function name的信息,比如说:“请帮我买个笔记本电脑,并帮我开一张发票",它实际只返回了“generate_invoice”

我期望返回的function是一个List,它可能是["buy_product","generate_invoice"],我并不需要它实际去调用外部api,而是希望能识别到这个指令可能包含多个function,并将返回的参数从一个string变成一个List即可。

根据我的判断,这个修改是不是该从推理的test_toolcall.py中改,如果能实现的话是否能请教下实现的思路,谢谢

System Info

No response

Others

No response

@DDYuudachi DDYuudachi changed the title 如果用户的一句message包含多个Function Call name,推理的代码是否支持识别 如果用户的一句message包含多个Function Call name,自带的推理代码是否支持识别 May 24, 2024
@hiyouga
Copy link
Owner

hiyouga commented May 24, 2024

目前本项目还不支持并行工具调用

@hiyouga hiyouga added the wontfix This will not be worked on label May 24, 2024
@hiyouga hiyouga closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants