Skip to content

Commit

Permalink
Added HARD_DELETE_CHATS to environment variables (onyx-dot-app#2397)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen-danswer authored and rajiv chodisetti committed Oct 2, 2024
1 parent a59252b commit 569bd33
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/danswer/configs/chat_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@
# Stops streaming answers back to the UI if this pattern is seen:
STOP_STREAM_PAT = os.environ.get("STOP_STREAM_PAT") or None

# The backend logic for this being True isn't fully supported yet
HARD_DELETE_CHATS = False
# Set this to "true" to hard delete chats
# This will make chats unviewable by admins after a user deletes them
# As opposed to soft deleting them, which just hides them from non-admin users
HARD_DELETE_CHATS = os.environ.get("HARD_DELETE_CHATS", "").lower() == "true"

# Internet Search
BING_API_KEY = os.environ.get("BING_API_KEY") or None
Expand Down
3 changes: 3 additions & 0 deletions deployment/docker_compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ services:
- LOG_ENDPOINT_LATENCY=${LOG_ENDPOINT_LATENCY:-}
- LOG_POSTGRES_LATENCY=${LOG_POSTGRES_LATENCY:-}
- LOG_POSTGRES_CONN_COUNTS=${LOG_POSTGRES_CONN_COUNTS:-}

# Chat Configs
- HARD_DELETE_CHATS=${HARD_DELETE_CHATS:-}

# Enterprise Edition only
- ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=${ENABLE_PAID_ENTERPRISE_EDITION_FEATURES:-false}
Expand Down
3 changes: 3 additions & 0 deletions deployment/docker_compose/docker-compose.gpu-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ services:
# (time spent on finding the right docs + time spent fetching summaries from disk)
- LOG_VESPA_TIMING_INFORMATION=${LOG_VESPA_TIMING_INFORMATION:-}

# Chat Configs
- HARD_DELETE_CHATS=${HARD_DELETE_CHATS:-}

# Enterprise Edition only
- API_KEY_HASH_ROUNDS=${API_KEY_HASH_ROUNDS:-}
- ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=${ENABLE_PAID_ENTERPRISE_EDITION_FEATURES:-false}
Expand Down
2 changes: 2 additions & 0 deletions deployment/helm/charts/danswer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,5 @@ configMap:
# Shared or Non-backend Related
WEB_DOMAIN: "http://localhost:3000" # for web server and api server
DOMAIN: "localhost" # for nginx
# Chat Configs
HARD_DELETE_CHATS: ""
2 changes: 2 additions & 0 deletions deployment/kubernetes/env-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ data:
INTERNAL_URL: "http://api-server-service:80" # for web server
WEB_DOMAIN: "http://localhost:3000" # for web server and api server
DOMAIN: "localhost" # for nginx
# Chat Configs
HARD_DELETE_CHATS: ""

0 comments on commit 569bd33

Please sign in to comment.