diff --git a/dream-server/scripts/first-boot-demo.sh b/dream-server/scripts/first-boot-demo.sh index ae507b41e..9565399c5 100755 --- a/dream-server/scripts/first-boot-demo.sh +++ b/dream-server/scripts/first-boot-demo.sh @@ -91,8 +91,8 @@ check_service() { local name=$1 local url=$2 local endpoint=${3:-/health} - - if curl -sf "${url}${endpoint}" > /dev/null 2>&1; then + + if curl -sf --max-time 10 "${url}${endpoint}" > /dev/null 2>&1; then success "$name is running at $url" return 0 else @@ -142,7 +142,7 @@ if check_service "Open WebUI" "$WEBUI_URL" "/"; then fi # Optional services -if curl -sf "${WHISPER_URL}/health" > /dev/null 2>&1; then +if curl -sf --max-time 10 "${WHISPER_URL}/health" > /dev/null 2>&1; then success "Whisper STT is running (voice input enabled)" WHISPER_AVAILABLE=true ((SERVICES_OK++)) @@ -152,7 +152,7 @@ else WHISPER_AVAILABLE=false fi -if curl -sf "${PIPER_URL}" > /dev/null 2>&1; then +if curl -sf --max-time 10 "${PIPER_URL}" > /dev/null 2>&1; then success "OpenTTS TTS is running (voice output enabled)" PIPER_AVAILABLE=true ((SERVICES_OK++)) @@ -162,7 +162,7 @@ else PIPER_AVAILABLE=false fi -if curl -sf "${N8N_URL}/healthz" > /dev/null 2>&1; then +if curl -sf --max-time 10 "${N8N_URL}/healthz" > /dev/null 2>&1; then success "n8n Workflows is running (automation enabled)" N8N_AVAILABLE=true ((SERVICES_OK++)) @@ -190,7 +190,7 @@ header "💬 Demo 1: Local Chat Completion" demo "Asking your local AI a question..." -RESPONSE=$(curl -sf "${LLM_URL}/v1/chat/completions" \ +RESPONSE=$(curl -sf --max-time 30 "${LLM_URL}/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "Qwen/Qwen2.5-32B-Instruct-AWQ", @@ -218,7 +218,7 @@ header "🧑‍💻 Demo 2: Code Assistance" demo "Asking for help with a Python function..." -CODE_RESPONSE=$(curl -sf "${LLM_URL}/v1/chat/completions" \ +CODE_RESPONSE=$(curl -sf --max-time 30 "${LLM_URL}/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "Qwen/Qwen2.5-32B-Instruct-AWQ", diff --git a/dream-server/scripts/showcase.sh b/dream-server/scripts/showcase.sh index 3882e6c96..e4fcc6775 100755 --- a/dream-server/scripts/showcase.sh +++ b/dream-server/scripts/showcase.sh @@ -63,7 +63,7 @@ print_menu() { check_service() { local url=$1 local endpoint=$2 - curl -sf "${url}${endpoint}" > /dev/null 2>&1 + curl -sf --max-time 10 "${url}${endpoint}" > /dev/null 2>&1 } demo_chat() { @@ -94,8 +94,8 @@ demo_chat() { fi echo -ne "${CYAN}AI: ${NC}" - - response=$(curl -sf "${LLM_URL}/v1/chat/completions" \ + + response=$(curl -sf --max-time 30 "${LLM_URL}/v1/chat/completions" \ -H "Content-Type: application/json" \ -d "$(jq -n --arg msg "$user_input" '{ model: "local", @@ -213,9 +213,9 @@ demo_rag() { fi echo -ne "${CYAN}Answer: ${NC}" - + # Use document as context - response=$(curl -sf "${LLM_URL}/v1/chat/completions" \ + response=$(curl -sf --max-time 30 "${LLM_URL}/v1/chat/completions" \ -H "Content-Type: application/json" \ -d "$(jq -n --arg doc "$DOC_CONTENT" --arg q "$question" '{ model: "local", @@ -286,8 +286,8 @@ demo_code() { echo "" prompt="Task: $task\n\nCode:\n\`\`\`\n$CODE\n\`\`\`" - - response=$(curl -sf "${LLM_URL}/v1/chat/completions" \ + + response=$(curl -sf --max-time 30 "${LLM_URL}/v1/chat/completions" \ -H "Content-Type: application/json" \ -d "$(jq -n --arg p "$prompt" '{ model: "local", diff --git a/dream-server/scripts/validate-manifests.sh b/dream-server/scripts/validate-manifests.sh old mode 100644 new mode 100755