feat: Refactor LLM router and integrate health check endpoint

- Simplified LLM call logic in llm_router.py, removing tool adapter complexity and enhancing error handling.
- Added health check endpoint to main.py for system status verification.
- Cleaned up router.py by removing unused imports and commented-out code, streamlining the structure.
- Updated docker-compose.yml to unify services under a single Lyra container, enhancing deployment simplicity.
- Created Dockerfile for unified container setup, including both Relay and Cortex services.
- Added QUICKSTART.md for improved onboarding and usage instructions.
- Implemented start.sh script to manage service startup and health checks.
This commit is contained in:
2026-05-29 18:20:56 -04:00
parent 376b8114ad
commit 5f53fb32a4
14 changed files with 802 additions and 1665 deletions
+48
View File
@@ -0,0 +1,48 @@
# Unified Lyra Container - Relay (Node) + Cortex (Python)
FROM python:3.11-slim
# Install Node.js, npm, and docker CLI
RUN apt-get update && apt-get install -y \
curl \
docker.io \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# ============================================================
# Install Python dependencies (Cortex)
# ============================================================
COPY cortex/requirements.txt /app/cortex/requirements.txt
RUN pip install --no-cache-dir -r /app/cortex/requirements.txt
# ============================================================
# Install Node dependencies (Relay)
# ============================================================
COPY core/relay/package*.json /app/relay/
WORKDIR /app/relay
RUN npm install
# ============================================================
# Copy application code
# ============================================================
WORKDIR /app
COPY cortex/ /app/cortex/
COPY core/relay/ /app/relay/
# ============================================================
# Copy startup script
# ============================================================
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
# ============================================================
# Expose ports
# ============================================================
EXPOSE 7078 7081
# ============================================================
# Start both services
# ============================================================
CMD ["/app/start.sh"]