feat: adjust the way of returning data to LLM (#69)

This commit is contained in:
sigoden
2024-07-10 18:53:32 +08:00
committed by GitHub
parent 01e07c0cc0
commit 732eae532c
37 changed files with 218 additions and 142 deletions
+1 -2
View File
@@ -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()}`
}
-1
View File
@@ -8,5 +8,4 @@ def get_sysinfo():
return "\n".join([
f"OS: {platform.system()}",
f"Arch: {platform.machine()}",
f"User: {os.environ.get('USER')}"
])
+4 -3
View File
@@ -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