aboutsummaryrefslogtreecommitdiffstats
path: root/tools/demo_tool.py
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-07 21:58:46 +0800
committerGitHub <noreply@github.com>2024-06-07 21:58:46 +0800
commit0c6b609c261cb6f586668626d860dc6754725794 (patch)
treec41bb58e38908bbfa1430c7d2b10974ab8a873cf /tools/demo_tool.py
parent63df67acea19b3708d34ef3b656c1b784c2a72f4 (diff)
downloadllm-functions-docker-0c6b609c261cb6f586668626d860dc6754725794.tar.gz
refactor: demo_tool.* inspect LLM_* env vars (#33)
Diffstat (limited to 'tools/demo_tool.py')
-rw-r--r--tools/demo_tool.py16
1 files changed, 7 insertions, 9 deletions
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