Files
rag-technical-docs-assistant/docker-compose.local-s2s-test.yml
T
amirhosein mazaheri 42400495af feat(backend): integrate document deletion and grounded speech providers
Enable replay-safe document deletion and public deployment model identifiers with the forward voice-model schema revision.

Add GapGPT dialogue and ElevenLabs speech routing, strict extractive grounding, ten-source retrieval and regression coverage.

Validation: 199 targeted provider-free tests passed. The full provider-free run stalled and was interrupted; PostgreSQL acceptance was not run because TEST_DATABASE_URL is unset.
2026-10-20 09:00:37 +03:30

114 lines
4.9 KiB
YAML

# Standalone file: never extend the operational compose stack.
name: rag-local-s2s-test
x-candidate-env: &candidate-env
PROVIDER: local_s2s
VOICE_PROVIDER: local_s2s
LOCAL_S2S_COMPONENT_PROVIDER: ${LOCAL_S2S_COMPONENT_PROVIDER:-split}
LOCAL_S2S_TTS_PROVIDER: ${LOCAL_S2S_TTS_PROVIDER:-upstream}
LOCAL_S2S_STT_PROVIDER: ${LOCAL_S2S_STT_PROVIDER:-upstream}
LOCAL_S2S_ENABLED: ${LOCAL_S2S_ENABLE_CANDIDATE:-false}
VOICE_TRANSPORT_TESTING: "true"
LOCAL_S2S_ENDPOINT: ws://local-s2s-engine:8765/v1/realtime
LOCAL_S2S_STT_MODEL: ${LOCAL_S2S_STT_MODEL:-openai/whisper-large-v3}
LOCAL_S2S_LLM_MODEL: ${LOCAL_S2S_LLM_MODEL:-openai/gpt-4.1-mini}
LOCAL_S2S_TTS_MODEL: ${LOCAL_S2S_TTS_MODEL:-gpt-4o-mini-tts-2025-12-15}
LOCAL_S2S_TTS_VOICE: ${LOCAL_S2S_TTS_VOICE:-alloy}
LOCAL_S2S_MAX_OUTPUT_TOKENS: "256"
LOCAL_S2S_REQUEST_TIMEOUT_SECONDS: "30"
LOCAL_S2S_TOKEN: ${LOCAL_S2S_TOKEN:-}
INGEST_DATABASE_URL: postgresql+psycopg://local_s2s_test:isolated-test-only@candidate_db:5432/rag_local_s2s_test
INGEST_ORIGINAL_DIRECTORY: /app/data/local-s2s-test/originals
INGEST_EXTRACTION_DIRECTORY: /app/data/local-s2s-test/extractions
# Greeting/transport-only profile; this endpoint deliberately cannot do inference.
INGEST_EMBEDDING_PROVIDER: openai
INGEST_EMBEDDING_ENDPOINT: http://127.0.0.1:9/v1
INGEST_EMBEDDING_MODEL: text-embedding-3-small
INGEST_EMBEDDING_DIMENSIONS: "1536"
INGEST_EMBEDDING_API_KEY: transport-test-no-inference
TRUSTED_ORIGINS: '["http://127.0.0.2:8091"]'
TRUSTED_HOSTS: '["127.0.0.2:8091"]'
COOKIE_SECURE: "false"
services:
candidate_db:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: rag_local_s2s_test
POSTGRES_USER: local_s2s_test
POSTGRES_PASSWORD: isolated-test-only
volumes: [candidate_postgres:/var/lib/postgresql/data]
healthcheck:
test: [CMD-SHELL, pg_isready -U local_s2s_test -d rag_local_s2s_test]
interval: 3s
timeout: 3s
retries: 20
candidate_migrations:
image: rag-local-s2s-candidate:phase2
environment: *candidate-env
command: [alembic, upgrade, head]
depends_on:
candidate_db: {condition: service_healthy}
local-s2s-engine:
image: rag-local-s2s-candidate:phase2
environment:
PROVIDER: local_s2s
VOICE_PROVIDER: local_s2s
LOCAL_S2S_ENABLED: ${LOCAL_S2S_ENABLE_CANDIDATE:-false}
VOICE_TRANSPORT_TESTING: "true"
LOCAL_S2S_STT_MODEL: ${LOCAL_S2S_STT_MODEL:-openai/whisper-large-v3}
LOCAL_S2S_LLM_MODEL: ${LOCAL_S2S_LLM_MODEL:-openai/gpt-4.1-mini}
LOCAL_S2S_TTS_MODEL: ${LOCAL_S2S_TTS_MODEL:-gpt-4o-mini-tts-2025-12-15}
LOCAL_S2S_TTS_VOICE: ${LOCAL_S2S_TTS_VOICE:-alloy}
LOCAL_S2S_MAX_OUTPUT_TOKENS: "256"
LOCAL_S2S_REQUEST_TIMEOUT_SECONDS: "30"
LOCAL_S2S_TOKEN: ${LOCAL_S2S_TOKEN:-}
# No database URL or application identity is supplied to the engine.
# The inference key is sent only to the engine, never to the API/browser.
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
LOCAL_S2S_COMPONENT_PROVIDER: ${LOCAL_S2S_COMPONENT_PROVIDER:-split}
GAPGPT_API_KEY: ${GAPGPT_API_KEY:-}
LOCAL_S2S_TTS_PROVIDER: ${LOCAL_S2S_TTS_PROVIDER:-upstream}
LOCAL_S2S_STT_PROVIDER: ${LOCAL_S2S_STT_PROVIDER:-upstream}
ELEVENLABS_API_KEY: ${ELEVENLABS_API_KEY:-}
LOCAL_S2S_STRICT_GROUNDING: ${LOCAL_S2S_STRICT_GROUNDING:-false}
LOCAL_S2S_ALLOW_PAID_STARTUP: ${LOCAL_S2S_ALLOW_PAID_STARTUP:-false}
LOCAL_S2S_SILERO_SOURCE: /vad/silero-vad
LOCAL_S2S_NLTK_DATA: /assets/nltk
LOCAL_S2S_ASSET_MANIFEST: /assets/assets.json
LOCAL_S2S_ASSET_MANIFEST_SHA256: ${LOCAL_S2S_ASSET_MANIFEST_SHA256:-}
# Set to a separately provisioned local Silero source+asset bundle; no download.
volumes:
- type: bind
source: ${LOCAL_S2S_VAD_SOURCE:-./.local-s2s-build/vad-not-provisioned}
target: /vad/silero-vad
read_only: true
bind: {create_host_path: false}
- type: bind
source: ${LOCAL_S2S_NLTK_SOURCE:-./.local-s2s-build/nltk-not-provisioned}
target: /assets/nltk
read_only: true
bind: {create_host_path: false}
- type: bind
source: ${LOCAL_S2S_ASSET_MANIFEST_SOURCE:-./.local-s2s-build/assets.json}
target: /assets/assets.json
read_only: true
bind: {create_host_path: false}
mem_limit: 4g
cpus: 2
pids_limit: 128
candidate_api:
image: rag-local-s2s-candidate:phase2
command: [python, -m, app.server, --host, 0.0.0.0, --port, "8000"]
environment: *candidate-env
ports: ["127.0.0.2:8091:8000"]
volumes:
- candidate_originals:/app/data/local-s2s-test/originals
- candidate_extractions:/app/data/local-s2s-test/extractions
depends_on:
candidate_migrations: {condition: service_completed_successfully}
mem_limit: 2g
pids_limit: 128
volumes:
candidate_postgres:
candidate_originals:
candidate_extractions: