No description
Find a file
2024-02-23 19:38:27 +08:00
toolbench first commit 2024-02-23 15:13:06 +08:00
.gitattributes first commit 2024-02-23 15:13:06 +08:00
.gitignore first commit 2024-02-23 15:13:06 +08:00
anytool.py first commit 2024-02-23 15:13:06 +08:00
anytoolbench.json first commit 2024-02-23 15:13:06 +08:00
api_database_function.py first commit 2024-02-23 15:13:06 +08:00
arguments.py first commit 2024-02-23 15:13:06 +08:00
check_solved.py first commit 2024-02-23 15:13:06 +08:00
config_example.py first commit 2024-02-23 15:13:06 +08:00
custom_query_data0129.json first commit 2024-02-23 15:13:06 +08:00
data_for_retrieval.json first commit 2024-02-23 15:13:06 +08:00
data_generation_by_gpt4.py first commit 2024-02-23 15:13:06 +08:00
dfs_gt.py first commit 2024-02-23 15:13:06 +08:00
extract_api_details.py first commit 2024-02-23 15:13:06 +08:00
extract_category_tool_details.py first commit 2024-02-23 15:13:06 +08:00
extract_tool_database.py first commit 2024-02-23 15:13:06 +08:00
LICENSE first commit 2024-02-23 15:13:06 +08:00
openai_utils.py first commit 2024-02-23 15:13:06 +08:00
prompt_template.py first commit 2024-02-23 15:13:06 +08:00
rapidapi.py first commit 2024-02-23 15:13:06 +08:00
rapidapi_key_list_example.json first commit 2024-02-23 15:13:06 +08:00
README.md 1 2024-02-23 19:38:27 +08:00
requirements.txt first commit 2024-02-23 15:13:06 +08:00
run_main.sh first commit 2024-02-23 15:13:06 +08:00
server.py first commit 2024-02-23 15:13:06 +08:00
solved_dict.json first commit 2024-02-23 15:13:06 +08:00
tool_details.json first commit 2024-02-23 15:13:06 +08:00
unsolvable.json first commit 2024-02-23 15:13:06 +08:00
verifier.py first commit 2024-02-23 15:13:06 +08:00

AnyTool

Static Badge

This is the implementation of the paper AnyTool: Self-Reflective, Hierarchical Agents for Large-Scale API Calls Figure

🔧 Installation

Dependencies

Require Python 3.9+

🚀 Quick install

pip install requirements.txt

🔆 Data

ToolBench

Refer to ToolBench.

AnyToolBench

Generation script

python data_generation_by_gpt4.py

We provide sample data in anytoolbench.json file.

🚗 Run AnyTool

Fill your OpenAI config and toolbench key into the config.py.

Run ToolBench

python anytool.py --output_dir result/test_instruction/G1_instruction --query_path data/test_instruction/G1_instruction.json --max_api_number 64

Run AnyToolBench

python anytool.py --output_dir result/anytoolbench --query_path anytoolbench.json -max_api_number 64

👨‍🏫 Acknowledgement

This repo is built on ToolBench.

📑Citation

If you find this project is helpful for your research, consider citing our paper

@article{du2024anytool,
  title={AnyTool: Self-Reflective, Hierarchical Agents for Large-Scale API Calls},
  author={Du, Yu and Wei, Fangyun and Zhang, Hongyang},
  journal={arXiv preprint arXiv:2402.04253},
  year={2024}
}