aboutsummaryrefslogtreecommitdiffstats
path: root/agents/demo/tools.js
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-07-29 17:26:36 +0800
committerGitHub <noreply@github.com>2024-07-29 17:26:36 +0800
commit213d1b3fd72d2572050402b6be25cad590a9cb95 (patch)
treec153a8ededeeb1bb1326e9edbb193685a4198b8b /agents/demo/tools.js
parent226228dfa45aa075f1a74b07885407d9dba6017f (diff)
downloadllm-functions-docker-213d1b3fd72d2572050402b6be25cad590a9cb95.tar.gz
refactor: demo agent (#81)
Diffstat (limited to 'agents/demo/tools.js')
-rw-r--r--agents/demo/tools.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/agents/demo/tools.js b/agents/demo/tools.js
index 6a5c071..a3b141b 100644
--- a/agents/demo/tools.js
+++ b/agents/demo/tools.js
@@ -1,8 +1,7 @@
-const os = require("node:os");
/**
* Get the system info
*/
-exports.get_sysinfo = function getSysinfo() {
- return `OS: ${os.type()}
-Arch: ${os.arch()}`
+exports.get_ipinfo = async function getIpinfo() {
+ const res = await fetch("https://httpbin.org/ip")
+ return res.json();
}