LLM router - proxies to provider skills (claude, openai, ollama)
This commit is contained in:
48
scripts/autorun.sh
Normal file
48
scripts/autorun.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SKILL_DIR="$(dirname "$(dirname "$0")")"
|
||||
|
||||
# Install Python if not present
|
||||
install_python() {
|
||||
if command -v python3 &>/dev/null; then
|
||||
echo "Python already installed: $(python3 --version)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Installing Python..."
|
||||
apt-get update
|
||||
apt-get install -y python3 python3-pip python3-venv
|
||||
|
||||
echo "Python installed: $(python3 --version)"
|
||||
}
|
||||
|
||||
# Setup Python virtual environment and dependencies
|
||||
setup_python_env() {
|
||||
local venv_dir="$SKILL_DIR/.venv"
|
||||
|
||||
if [ -d "$venv_dir" ]; then
|
||||
echo "Python venv already exists"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Creating Python virtual environment..."
|
||||
python3 -m venv "$venv_dir"
|
||||
|
||||
echo "Installing Python dependencies..."
|
||||
"$venv_dir/bin/pip" install --upgrade pip
|
||||
"$venv_dir/bin/pip" install \
|
||||
fastapi==0.109.0 \
|
||||
uvicorn==0.27.0 \
|
||||
websockets==12.0 \
|
||||
httpx==0.26.0 \
|
||||
pydantic==2.5.0 \
|
||||
python-ulid==2.2.0
|
||||
|
||||
echo "Python environment ready"
|
||||
}
|
||||
|
||||
install_python
|
||||
setup_python_env
|
||||
|
||||
echo "LLM router setup complete"
|
||||
Reference in New Issue
Block a user