You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here test query is just a single query in the expected format. I noticed on L119 of tool_llama_model.py, it looks like the function and arguments get parsed to a key function_call:
But then on L232 and a few other places of DFS.py, it looks like this key is ignored, in favor of tool_calls:
# if "function_call" in new_message.keys():if"tool_calls"innew_message.keys() andnew_message["tool_calls"] !=Noneandlen(new_message["tool_calls"]) >0:
tool_calls=new_message["tool_calls"]
ifself.process_id==0:
print("number of parallel calls:",len(tool_calls))
Is this to support more calls than just one? And if so, to get this to work with ToolLLaMa, do I need to modify either code path, or just call the script with different arguments? If there's a fix that makes sense I can try to contribute it! One simple idea I could do: if function_call is present and tool_calls is not present, modify the message so that the function call becomes an element of tool_calls.
The text was updated successfully, but these errors were encountered:
Hi! I'm working on running ToolLLaMa against the StableToolBench server, and noticed an issue. I am executing the following:
python toolbench/inference/qa_pipeline.py \ --tool_root_dir data_example/toolenv/tools/ \ --backbone_model toolllama \ --model_path ToolBench/ToolLLaMA-2-7b-v2 \ --max_observation_length 1024 \ --observ_compress_method truncate \ --method DFS_woFilter_w2 \ --input_query_file data_example/example_instructions/test_query.json \ --output_answer_file outputs/tolllama_dfs_inference_result \ --toolbench_key $TOOLBENCH_KEY
Here test query is just a single query in the expected format. I noticed on L119 of tool_llama_model.py, it looks like the function and arguments get parsed to a key
function_call
:But then on L232 and a few other places of DFS.py, it looks like this key is ignored, in favor of
tool_calls
:Is this to support more calls than just one? And if so, to get this to work with ToolLLaMa, do I need to modify either code path, or just call the script with different arguments? If there's a fix that makes sense I can try to contribute it! One simple idea I could do: if
function_call
is present andtool_calls
is not present, modify the message so that the function call becomes an element oftool_calls
.The text was updated successfully, but these errors were encountered: