Skip to content

Commit abdb40c

Browse files
committed
feat: enable audit logging and guardrails in configuration
1 parent c611354 commit abdb40c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RESULT_EXPIRES=86400
4444

4545
# ── Audit logging (langextract-audit) ────────────────────────────────────────
4646
# Enable structured audit logging for every LLM inference call
47-
AUDIT_ENABLED=false
47+
AUDIT_ENABLED=true
4848
# Sink type: logging (stdlib), jsonfile (NDJSON file), otel (OpenTelemetry)
4949
AUDIT_SINK=logging
5050
# Path for the NDJSON audit file (only used when AUDIT_SINK=jsonfile)
@@ -54,7 +54,7 @@ AUDIT_LOG_PATH=audit.jsonl
5454

5555
# ── Guardrails / output validation (langextract-guardrails) ──────────────────
5656
# Enable LLM output validation with automatic retry & corrective prompting
57-
GUARDRAILS_ENABLED=false
57+
GUARDRAILS_ENABLED=true
5858
# Maximum retry attempts when validation fails (default 3)
5959
GUARDRAILS_MAX_RETRIES=3
6060
# Include invalid output in correction prompt (set false to save tokens)

app/core/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ class Settings(BaseSettings):
9898
EXTRACTION_CACHE_BACKEND: str = "redis" # redis | disk | none
9999

100100
# ── Audit logging ───────────────────────────────────────────────
101-
AUDIT_ENABLED: bool = False
101+
AUDIT_ENABLED: bool = True
102102
AUDIT_SINK: str = "logging" # logging | jsonfile | otel
103103
AUDIT_LOG_PATH: str = "audit.jsonl"
104104
AUDIT_SAMPLE_LENGTH: int | None = None
105105

106106
# ── Guardrails (output validation) ──────────────────────────────
107-
GUARDRAILS_ENABLED: bool = False
107+
GUARDRAILS_ENABLED: bool = True
108108
GUARDRAILS_MAX_RETRIES: int = 3
109109
GUARDRAILS_MAX_CONCURRENCY: int | None = None
110110
GUARDRAILS_INCLUDE_OUTPUT_IN_CORRECTION: bool = True

0 commit comments

Comments
 (0)