Files
PTSRaiAgent/.env.example
ElebobaandClaude Opus 5.5 6dda5f9b30
CI / ruff · pytest (pull_request) Successful in 2m10s
feat(bot): tool-using chat agent over RAG, ЕМИАС record and drug-safety reference
Free-text treatment and medication questions go to an LLM agent with read-only tools bound to the current
patient: guideline search (RAG, doses stripped), ЕМИАС record mock (diagnoses, comorbidities, intolerances,
other specialists' drugs, current prescription), drug info (composition, contraindications, interactions)
and a deterministic patient-specific check. Providers: OpenRouter (temporary, synthetic data only) and an
offline mock; GigaChat to follow. Scrubbed input only, forbidden-output filter, any failure falls back to
the existing extractive RAG / instruction answers. Off unless OPENROUTER_API_KEY or CHAT_AGENT=mock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:39:16 +03:00

37 lines
1.3 KiB
Bash

# Copy to .env. Secrets only here; .env is gitignored.
# --- LLM (152-FZ: GigaChat only). mock = offline demo without network (ADR-004)
LLM_PROVIDER=mock
GIGACHAT_CREDENTIALS=
GIGACHAT_SCOPE=GIGACHAT_API_PERS
GIGACHAT_MODEL=GigaChat
# --- Chat agent: auto | off | mock | openrouter | gigachat. OpenRouter = temporary, synthetic data only.
CHAT_AGENT=auto
OPENROUTER_API_KEY=
OPENROUTER_MODEL=anthropic/claude-sonnet-4.5
# --- Pseudonymisation key: 32+ random bytes, hex. Generate: python -c "import secrets;print(secrets.token_hex(32))"
PSEUDO_KEY=
# --- Databases (docker compose overrides the URLs to point at the postgres service)
POSTGRES_PASSWORD=postgres
IDENTITY_DB_PASSWORD=identity_app
CLINICAL_DB_PASSWORD=clinical_app
IDENTITY_DB_URL=postgresql+asyncpg://identity_app:identity_app@localhost:5432/identity
CLINICAL_DB_URL=postgresql+asyncpg://clinical_app:clinical_app@localhost:5432/clinical
# --- Telegram: prototype on synthetic data only; prod channel is MAX / Gosuslugi. Empty = bot disabled.
TG_BOT_TOKEN=
DOCTOR_NOTIFY_CHAT_ID=
# --- Demo virtual clock (ADR-005)
DEMO_CLOCK=true
TZ=Europe/Moscow
# --- Gitea (for Claude Code / team workflow, not used by the app)
GITEA_URL=https://gitea.24studbank.ru
GITEA_REPO=MedITron/PTSRaiAgent
GITEA_USER=
GITEA_TOKEN=