LLM_Monitor / start_sidecar.sh
potato-pzy
feat: remove powered-by line and integrate sidecar with sentence-level streaming
02422e3
Raw
History Blame Contribute Delete
1.14 kB
#!/usr/bin/env bash
# start_sidecar.sh β€” Launch the GenAI Shield Sidecar standalone
#
# Usage:
# ./start_sidecar.sh # default port 5050
# SIDECAR_PORT=8080 ./start_sidecar.sh # custom port
# GEMINI_API_KEY=... ./start_sidecar.sh # with API key inline
set -e
SIDECAR_PORT="${SIDECAR_PORT:-5050}"
LOG_LEVEL="${LOG_LEVEL:-info}"
echo "╔══════════════════════════════════════════════╗"
echo "β•‘ GenAI Shield Sidecar β€” Starting up β•‘"
echo "β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•"
echo ""
echo " Port: $SIDECAR_PORT"
echo " Backend: ${LLM_BACKEND:-gemini}"
echo " UI: http://localhost:$SIDECAR_PORT"
echo " API Docs: http://localhost:$SIDECAR_PORT/docs"
echo ""
# Run from project root so imports resolve correctly
cd "$(dirname "$0")"
python -m uvicorn sidecar.app:app \
--host 0.0.0.0 \
--port "$SIDECAR_PORT" \
--log-level "$LOG_LEVEL" \
--no-access-log