lucidrains / toolformer-pytorch

Implementation of Toolformer, Language Models That Can Use Tools, by MetaAI
MIT License
1.94k stars 124 forks source link

issues about invoke_tools #19

Open nbllxbl opened 6 months ago

nbllxbl commented 6 months ago

My invoke_tools function can't get right outputs, but when I replace "regex = create_function_regex(wapi_start, api_stop)" line in function with regex = create_function_regex(), things get better. I don't know why but it does work.

joemzhao commented 1 month ago

https://github.com/lucidrains/toolformer-pytorch/blob/main/toolformer_pytorch/toolformer_pytorch.py#L195

api_stop should be "]" rather than " ]", which leads to different regex so the tools are not called.