debug log cleanup
This commit is contained in:
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
|
||||
|
||||
# 1. Run the agent (which returns a string)
|
||||
print(f"Parsing {entry_type}...")
|
||||
print(f"[DEBUG] Generating {entry_type}...")
|
||||
# print(content)
|
||||
result = await agent.run(content)
|
||||
raw_text = result.output
|
||||
|
||||
print(f"[DEBUG] Generated {entry_type}.")
|
||||
# 2. Clean the string
|
||||
# We remove the markdown decorators so json.loads doesn't crash
|
||||
clean_json = raw_text.replace("```json", "").replace("```", "").strip()
|
||||
|
||||
Reference in New Issue
Block a user