diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/demo_tool.js | 10 | ||||
| -rw-r--r-- | tools/demo_tool.py | 16 | ||||
| -rwxr-xr-x | tools/demo_tool.sh | 3 |
3 files changed, 18 insertions, 11 deletions
diff --git a/tools/demo_tool.js b/tools/demo_tool.js index 4fd6f04..c8b7237 100644 --- a/tools/demo_tool.js +++ b/tools/demo_tool.js @@ -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}`); + } + } } diff --git a/tools/demo_tool.py b/tools/demo_tool.py index 5eb4c09..d53cd0b 100644 --- a/tools/demo_tool.py +++ b/tools/demo_tool.py @@ -1,6 +1,6 @@ +import os from typing import List, Literal, Optional - def run( boolean: bool, string: str, @@ -22,11 +22,9 @@ def run( string_optional: Define a optional string property array_optional: Define a optional string array property """ - print(f"boolean: {boolean}") - print(f"string: {string}") - print(f"string_enum: {string_enum}") - print(f"integer: {integer}") - print(f"number: {number}") - print(f"array: {array}") - print(f"string_optional: {string_optional}") - print(f"array_optional: {array_optional}") + for key, value in locals().items(): + print(f"{key}: {value}") + + for key, value in os.environ.items(): + if key.startswith("LLM_"): + print(f"{key}: {value}")
\ No newline at end of file diff --git a/tools/demo_tool.sh b/tools/demo_tool.sh index 0d24c75..da35e8f 100755 --- a/tools/demo_tool.sh +++ b/tools/demo_tool.sh @@ -9,7 +9,8 @@ # @option --array-optional* Define a optional string array property main() { - ( set -o posix ; set ) | grep ^argc_ # inspect all argc variables + ( set -o posix ; set ) | grep ^argc_ + printenv | grep '^LLM_' } eval "$(argc --argc-eval "$0" "$@")"
\ No newline at end of file |
