From c1029e0ab7f4ef311d569380dbfc6d9003ddfcb9 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sat, 26 Apr 2025 21:58:22 +0800 Subject: [PATCH] add write_file_batch as tool --- chat_tools.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/chat_tools.py b/chat_tools.py index d0c5909..282ee7f 100644 --- a/chat_tools.py +++ b/chat_tools.py @@ -19,6 +19,27 @@ tools = [ }, "required": ["file_path","content"], }, + }, + }, + { + "type": "function", + "function": { + "name": "write_file_batch", + "description": "write contents files, creating directories if they do not exist. If the file already exists, it will be overwritten.", + "parameters": { + "type": "object", + "properties": { + "file_paths": { + "type": "array", + "description": "the path with file name to write to. it can be relative path. e.g. '[test_data/output/test.md]'", + }, + "contents": { + "type": "array", + "description": "the contents to write to the files.", + }, + }, + "required": ["file_paths","contents"], + }, } }, ]