debug log cleanup
This commit is contained in:
Binary file not shown.
4
agent.py
4
agent.py
@@ -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
2
bot.py
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user