From 22714994d2b7cfa238c8b2d54a3639cd6417e9b6 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 21 Nov 2025 22:30:47 -0800 Subject: scaffold implementation for remote sqlite db --- summarizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'summarizer.py') 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: -- cgit v1.2.3