refactor: demo_tool.* inspect LLM_* env vars (#33)

This commit is contained in:
sigoden
2024-06-07 21:58:46 +08:00
committed by GitHub
parent 63df67acea
commit 0c6b609c26
5 changed files with 56 additions and 20 deletions
+9 -1
View File
@@ -12,5 +12,13 @@
* @param {Args} args
*/
exports.run = function run(args) {
console.log(JSON.stringify(args, null, 2));
for (const [key, value] of Object.entries(args)) {
console.log(`${key}: ${JSON.stringify(value)}`);
}
for (const [key, value] of Object.entries(process.env)) {
if (key.startsWith("LLM_")) {
console.log(`${key}: ${value}`);
}
}
}