-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_web.sh
More file actions
executable file
·35 lines (26 loc) · 1.08 KB
/
run_web.sh
File metadata and controls
executable file
·35 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Use profile for persistent R session
cp profile.R .Rprofile
# Start R in a detached tmux session named R-session
# https://stackoverflow.com/questions/33426159/starting-a-new-tmux-session-and-detaching-it-all-inside-a-shell-script
#tmux new-session -d -s R-session "R"
# mcptools socket isn't visible in Docker container with tmux; use screen instead
screen -d -m -S R-session R
# Define a cleanup function
cleanup() {
echo "Script is being terminated. Cleaning up..."
# Kill the R session
#tmux kill-session -t R-session
screen -X -S R-session quit
# Remove the profile file
rm .Rprofile
}
# Set the trap to call cleanup on script termination
trap cleanup SIGINT SIGTERM
# Define the model
export OPENAI_MODEL_NAME=gpt-4o
# Suppress e.g. UserWarning: [EXPERIMENTAL] BaseAuthenticatedTool: This feature is experimental ...
# https://github.com/google/adk-python/commit/4afc9b2f33d63381583cea328f97c02213611529
export ADK_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS=true
# Startup the ADK web UI
OPENAI_API_KEY=`cat secret.openai-api-key` adk web --reload_agents --log_level=WARNING