From 63df67acea19b3708d34ef3b656c1b784c2a72f4 Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 7 Jun 2024 21:36:34 +0800 Subject: refactor: numerous improvements (#32) --- tools/demo_tool.js | 2 +- tools/save_file.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/demo_tool.js b/tools/demo_tool.js index d47fa59..4fd6f04 100644 --- a/tools/demo_tool.js +++ b/tools/demo_tool.js @@ -12,5 +12,5 @@ * @param {Args} args */ exports.run = function run(args) { - console.log(args); + console.log(JSON.stringify(args, null, 2)); } diff --git a/tools/save_file.sh b/tools/save_file.sh index 8d4d43c..c51079f 100755 --- a/tools/save_file.sh +++ b/tools/save_file.sh @@ -6,9 +6,9 @@ set -e # @option --contents! The contents to save. main() { - base_dir="$LLM_FUNCTIONS_DIR/tmp/files" - output_file="$base_dir/$argc_file_name" + base_dir="${LLM_TOOL_CACHE_DIR:-/tmp}" mkdir -p "$base_dir" + output_file="$base_dir/$argc_file_name" echo "$argc_contents" > "$output_file" echo "$output_file" } -- cgit v1.2.3