Files
rag-technical-docs-assistant/.env.example
T
11linear11 996435d2ae feat(voice): add authenticated Phase 2 live lifecycle
Add cookie authentication, owned conversations, durable Live reservations,
tool completion/replay fencing, revocation, and startup reconciliation.
Introduce forward lifecycle/owner-chain migrations and the temporary Gemini
adapter while preserving the existing OpenAI Realtime adapter.

Include the executable audio client, regression coverage, configuration,
API/database documentation, and recorded acceptance evidence.

Validation: focused review suite 82 passed; Python/TOML parsing, JavaScript
syntax, and whitespace checks passed. Full PostgreSQL/provider-free results
are recorded in the repair report; real-provider/browser acceptance is unrun.

Follow-up work remains for configurable OpenAI/Gemini selection, transport
admission, authority diagnostics, playback message bounds, and client replay
identity after ambiguous creation responses.
2026-10-09 07:59:02 -04:00

95 lines
3.6 KiB
Bash

# App Config
APP_NAME="Technical Documentation Assistant"
APP_VERSION="1.0.0"
APP_ENVIRONMENT="development"
# LLM Config
API_KEY="your-api-key-here"
LLM_BASE_URL="https://openrouter.ai/api/v1"
LLM_MODEL="gpt-4o-mini"
LLM_TEMPERATURE=0.0
LLM_MAX_TOKENS=2048
LLM_MAX_ITERATIONS=3
# RAG Config
CHUNK_SIZE=1000
CHUNK_OVERLAP=200
DOCS_DIR="./data/documents"
CHROMA_PERSIST_DIR="./data/vector_db"
# Independent ingestion settings. Choose the real deployment profile explicitly.
INGEST_DATABASE_URL="postgresql+psycopg://user:password@localhost:5432/rag"
INGEST_EMBEDDING_PROVIDER=""
# HTTP(S) host/optional port/path only; no userinfo/query/fragment/encoded components.
INGEST_EMBEDDING_ENDPOINT=""
INGEST_EMBEDDING_MODEL=""
INGEST_EMBEDDING_DIMENSIONS=
# Not needed for schema/bootstrap; required by the hosted embedding adapter.
INGEST_EMBEDDING_API_KEY=""
INGEST_EMBEDDING_PREPROCESSING_VERSION="v1"
INGEST_EMBEDDING_TIMEOUT_SECONDS=60
INGEST_ORIGINAL_DIRECTORY="data/originals"
INGEST_ACCEPTED_FORMATS='[".pdf", ".md", ".docx", ".jpg", ".jpeg", ".png"]'
INGEST_MAX_ORIGINAL_BYTES=20971520
INGEST_MAX_PDF_PAGES=200
INGEST_MAX_NORMALIZED_CHARACTERS=1000000
INGEST_MAX_CHUNKS=2000
INGEST_CHUNK_SIZE_CHARACTERS=1000
INGEST_CHUNK_OVERLAP_CHARACTERS=200
INGEST_EMBEDDING_BATCH_SIZE=32
INGEST_MAX_STAGED_BYTES=134217728
INGEST_WORKER_CONCURRENCY=1
INGEST_POLL_SECONDS=2
INGEST_HEARTBEAT_SECONDS=20
INGEST_LEASE_SECONDS=120
INGEST_MAX_AUTOMATIC_ATTEMPTS=3
INGEST_RETRY_BASE_SECONDS=2
INGEST_RETRY_CAP_SECONDS=300
# Engineering deployment defaults, not product-owner approval. No OCR at intake.
INGEST_EXTRACTION_DIRECTORY="data/extractions"
INGEST_MAX_DOCX_ENTRIES=2048
INGEST_MAX_DOCX_MEMBER_BYTES=16777216
INGEST_MAX_DOCX_EXPANDED_BYTES=67108864
INGEST_MAX_DOCX_COMPRESSION_RATIO=200
INGEST_MAX_IMAGE_WIDTH=12000
INGEST_MAX_IMAGE_HEIGHT=12000
INGEST_MAX_IMAGE_PIXELS=40000000
INGEST_EXTRACTION_STRATEGY="direct-quality-fallback-v1"
# Optional identity: configure all three together; credentials are needed only for opt-in Phase 3 vision.
# INGEST_VISION_PROVIDER="<chosen-provider>"
# INGEST_VISION_ENDPOINT="https://provider.example.invalid/v1"
# INGEST_VISION_MODEL="<chosen-model>"
# INGEST_VISION_API_KEY="<secret>"
INGEST_VISION_TIMEOUT_SECONDS=60
INGEST_FALLBACK_POLICY="affected-pages-v1"
INGEST_QUALITY_POLICY="bounded-checks-manual-review-v1"
# Preserve existing embedding preprocessing. New Persian normalization requires migration/reindex design.
INGEST_NORMALIZATION_POLICY="unicode-line-endings-v1"
INGEST_CHUNKING_POLICY="paragraph-v1"
INGEST_RENDER_DPI=144
INGEST_MAX_RENDERED_PAGE_PIXELS=20000000
INGEST_MAX_EXTRACTION_ARTIFACT_BYTES=33554432
INGEST_MAX_EXTRACTED_BLOCKS=10000
# Phase 4: select endpoint/model limits explicitly; no character-to-token estimate.
# INGEST_EMBEDDING_LIMITS='{"unit":"tokens","max_input_units":8192,"max_batch_units":300000,"max_batch_inputs":2048,"tokenizer":"tiktoken:cl100k_base"}'
# The example is NOT compatibility approval for an arbitrary endpoint/model.
INGEST_EMBEDDING_SEND_DIMENSIONS=false
INGEST_EMBEDDING_MAX_RESPONSE_BYTES=16777216
# Temporary sole voice provider; independent of extraction and embedding credentials.
PROVIDER=gemini
GEMINI_API_KEY=
GEMINI_MODEL=gemini-2.0-flash-exp
GEMINI_VOICE=Aoede
# GEMINI_PROXY=https://trusted-proxy.example:443
TRUSTED_ORIGINS=["http://localhost:8000","http://127.0.0.1:8000"]
TRUSTED_HOSTS=["localhost:8000","127.0.0.1:8000"]
# Explicit local development only. Production requires HTTPS and true.
COOKIE_SECURE=false
AUTH_SESSION_SECONDS=28800
LIVE_SESSION_SECONDS=600
# Path to a measured, profile-compatible calibrated report; never a status placeholder.
# SEARCH_CALIBRATION_REPORT=/absolute/path/measured-report.json