diff options
Diffstat (limited to 'agents')
| -rw-r--r-- | agents/demo/tools.js | 3 | ||||
| -rw-r--r-- | agents/demo/tools.py | 1 | ||||
| -rwxr-xr-x | agents/demo/tools.sh | 7 | ||||
| -rwxr-xr-x | agents/todo/tools.sh | 14 |
4 files changed, 12 insertions, 13 deletions
diff --git a/agents/demo/tools.js b/agents/demo/tools.js index 37f8937..6a5c071 100644 --- a/agents/demo/tools.js +++ b/agents/demo/tools.js @@ -4,6 +4,5 @@ const os = require("node:os"); */ exports.get_sysinfo = function getSysinfo() { return `OS: ${os.type()} -Arch: ${os.arch()} -User: ${process.env["USER"]}` +Arch: ${os.arch()}` } diff --git a/agents/demo/tools.py b/agents/demo/tools.py index 5f1a4fc..ec7ca2b 100644 --- a/agents/demo/tools.py +++ b/agents/demo/tools.py @@ -8,5 +8,4 @@ def get_sysinfo(): return "\n".join([ f"OS: {platform.system()}", f"Arch: {platform.machine()}", - f"User: {os.environ.get('USER')}" ])
\ No newline at end of file diff --git a/agents/demo/tools.sh b/agents/demo/tools.sh index 4b5849b..98f3d47 100755 --- a/agents/demo/tools.sh +++ b/agents/demo/tools.sh @@ -3,9 +3,10 @@ set -e # @cmd Get the system info get_sysinfo() { - echo "OS: $(uname)" - echo "Arch: $(arch)" - echo "User: $USER" + cat <<EOF >> "$LLM_OUTPUT" +OS: $(uname) +Arch: $(arch) +EOF } # See more details at https://github.com/sigoden/argc diff --git a/agents/todo/tools.sh b/agents/todo/tools.sh index 29454aa..6dbe869 100755 --- a/agents/todo/tools.sh +++ b/agents/todo/tools.sh @@ -17,7 +17,7 @@ add_todo() { --arg new_desc "$argc_desc" \ '. += [{"id": $new_id | tonumber, "desc": $new_desc}]' \ > "$todos_file" - echo "Successfully added todo id=$num" + echo "Successfully added todo id=$num" >> "$LLM_OUTPUT" } # @cmd Delete an existing todo item @@ -29,9 +29,9 @@ del_todo() { echo "$data" | \ jq --arg id $argc_id '[.[] | select(.id != ($id | tonumber))]' \ > "$todos_file" - echo "Successfully deleted todo id=$argc_id" + echo "Successfully deleted todo id=$argc_id" >> "$LLM_OUTPUT" else - echo "Empty todo list" + echo "Empty todo list" >> "$LLM_OUTPUT" fi } @@ -39,9 +39,9 @@ del_todo() { list_todos() { todos_file="$(_get_todos_file)" if [[ -f "$todos_file" ]]; then - cat "$todos_file" + cat "$todos_file" >> "$LLM_OUTPUT" else - echo '[]' + echo '[]' >> "$LLM_OUTPUT" fi } @@ -49,9 +49,9 @@ list_todos() { clear_todos() { todos_file="$(_get_todos_file)" if [[ -f "$todos_file" ]]; then - rm -rf "$todos_file" + rm -rf "$todos_file" >> "$LLM_OUTPUT" fi - echo "Successfully deleted entry todo list" + echo "Successfully deleted entry todo list" >> "$LLM_OUTPUT" } _argc_before() { |
