debug log cleanup

This commit is contained in:
2026-05-10 13:44:37 +01:00
parent 54000adeaa
commit 108d0f663d
3 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@@ -46,11 +46,11 @@ async def parse_page(content: str, entry_type: str = "opportunity"):
agent = opportunity_agent if entry_type == "opportunity" else event_agent agent = opportunity_agent if entry_type == "opportunity" else event_agent
# 1. Run the agent (which returns a string) # 1. Run the agent (which returns a string)
print(f"Parsing {entry_type}...") print(f"[DEBUG] Generating {entry_type}...")
# print(content) # print(content)
result = await agent.run(content) result = await agent.run(content)
raw_text = result.output raw_text = result.output
print(f"[DEBUG] Generated {entry_type}.")
# 2. Clean the string # 2. Clean the string
# We remove the markdown decorators so json.loads doesn't crash # We remove the markdown decorators so json.loads doesn't crash
clean_json = raw_text.replace("```json", "").replace("```", "").strip() clean_json = raw_text.replace("```json", "").replace("```", "").strip()

2
bot.py
View File

@@ -2,8 +2,8 @@ import os
import asyncio import asyncio
import sys import sys
import concurrent.futures import concurrent.futures
import logging import logging
from contextlib import suppress from contextlib import suppress
from dotenv import load_dotenv from dotenv import load_dotenv
from functools import wraps from functools import wraps