Skip to content

Commit

Permalink
Only init CHATDB if config set
Browse files Browse the repository at this point in the history
  • Loading branch information
epoz committed Jan 9, 2024
1 parent 277090e commit 20ea241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
else:
logging.basicConfig()

CHATDB = sqlite3.connect(CHATDB_FILEPATH)
if CHATDB_FILEPATH:
CHATDB = sqlite3.connect(CHATDB_FILEPATH)


def format_history(history: dict):
Expand Down

0 comments on commit 20ea241

Please sign in to comment.