aboutsummaryrefslogtreecommitdiffstats
path: root/summarizer.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-11-21 22:30:47 -0800
committerPinapelz <yukais@pinapelz.com>2025-11-21 23:27:30 -0800
commit22714994d2b7cfa238c8b2d54a3639cd6417e9b6 (patch)
treedc7036309fbb35376f452f44e33bfbe9c2e18c61 /summarizer.py
parenta7347217899fb7a3addcee58a9fbee4a0c07ff57 (diff)
scaffold implementation for remote sqlite db
Diffstat (limited to 'summarizer.py')
-rw-r--r--summarizer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/summarizer.py b/summarizer.py
index 25d1f8f..0c30347 100644
--- a/summarizer.py
+++ b/summarizer.py
@@ -1,5 +1,5 @@
from dotenv import load_dotenv
-from database import Database
+from common import create_database_connection
import openai
import json
import hashlib
@@ -26,7 +26,7 @@ def generate_headline_and_content_from_images(img_urls: list[str], game: str, me
# Limit message content to 500 characters
if len(message_content) > MAX_CHAR_CONTENT_CONSIDERATION_LENGTH:
message_content = message_content[:MAX_CHAR_CONTENT_CONSIDERATION_LENGTH]
- database = Database()
+ database = create_database_connection()
cache_key = _make_cache_key(game, img_urls)
cache_entry = database.get_summary(cache_key)
if cache_entry:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage