aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-agent.py
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-10-18 19:06:50 +0800
committerGitHub <noreply@github.com>2024-10-18 19:06:50 +0800
commitfb62dd5e18d77f465b1d27dad02a6eb1ab91185e (patch)
tree7a34805c2673eb6a2a19d977c2df68dff6384da1 /scripts/run-agent.py
parent6eb391bdc76ed070299f1b70e96f021a03a6d97a (diff)
downloadllm-functions-docker-fb62dd5e18d77f465b1d27dad02a6eb1ab91185e.tar.gz
refactor: support LLM_AGENT_DUMP_RESULT (#112)
Diffstat (limited to 'scripts/run-agent.py')
-rwxr-xr-xscripts/run-agent.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/run-agent.py b/scripts/run-agent.py
index 582b792..b97dcd1 100755
--- a/scripts/run-agent.py
+++ b/scripts/run-agent.py
@@ -100,7 +100,7 @@ def dump_result():
show_result = False
agent_name = os.environ["LLM_AGENT_NAME"].upper().replace("-", "_")
agent_env_name = f"LLM_AGENT_DUMP_RESULT_{agent_name}"
- agent_env_value = os.getenv(agent_env_name)
+ agent_env_value = os.getenv(agent_env_name, os.getenv("LLM_AGENT_DUMP_RESULT"))
func_name = os.environ["LLM_AGENT_FUNC"].upper().replace("-", "_")
func_env_name = f"{agent_env_name}_{func_name}"