diff --git a/foodie_utils.py b/foodie_utils.py index 692c6bc..947225d 100644 --- a/foodie_utils.py +++ b/foodie_utils.py @@ -355,6 +355,7 @@ def generate_image_query(title, summary): def smart_image_and_filter(title, summary): try: + logging.info(f"Processing title: raw_title='{title}', summary='{summary[:100]}...'") content = f"{title}\n\n{summary}" prompt = ( @@ -375,13 +376,29 @@ def smart_image_and_filter(title, summary): max_tokens=100 ) raw_result = response.choices[0].message.content.strip() - logging.debug(f"Raw GPT smart image/filter response: '{raw_result}'") + logging.debug(f"Raw GPT response: '{raw_result}'") cleaned_result = re.sub(r'```json\s*|\s*```', '', raw_result).strip() fixed_result = re.sub(r"(?