File size: 1,202 Bytes
82bf89e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
#!/bin/bash

# Retrieve service startup script - Biomedical RAG MCP service

echo "πŸš€ Starting Retrieve service (Biomedical RAG MCP)..."
echo "πŸ”¬ Service: Bio RAG MCP Server"
echo ""

# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"

# Set environment variables
export PYTHONPATH="$SCRIPT_DIR"
export PYTHONUNBUFFERED=1

echo "πŸ“ Working directory: $SCRIPT_DIR"
echo "🐍 Python path: $PYTHONPATH"
echo "πŸ“‘ Service endpoints:"
echo "   - Health check: http://localhost:9487/health"
echo "   - Document retrieval: POST http://localhost:9487/retrieve"
echo "   - Streaming chat (RAG): POST http://localhost:9487/stream-chat"
echo "   - Bio QA MCP SSE: http://127.0.0.1:9487/sse"
echo "πŸ”§ Configuration: app_config_dev.yaml"
echo "πŸ“Š Logs: Check logs/ directory for detailed logs"
echo ""

# Check if .env file exists
if [ -f ".env" ]; then
    echo "βœ… Environment file (.env) found"
else
    echo "⚠️  Warning: .env file not found, using system environment variables"
    echo "   Consider copying env_example.txt to .env and configuring it"
fi

echo "🌐 Starting server on port 9487..."
echo ""

# Start the service
python3 main.py