Spaces:
Running
Running
File size: 1,290 Bytes
3b835f5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | """
Debug script — Day 4
Written as a real .py file specifically to avoid PowerShell's `-c`
inline quoting hazards: a literal $ inside a double-quoted PowerShell
string triggers variable interpolation and silently mangles the text
(this is what happened to "$50" in an earlier -c command). Running from
a file sidesteps the shell entirely.
Prints the FULL returned dict (not just final_verdict) plus its type,
with verbose=True so any suppressed retry/backoff messages become
visible -- verbose was False in the run that returned None, which would
have silently hidden a 503/429 retry cycle if one happened.
"""
import asyncio
import json
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from dotenv import load_dotenv
load_dotenv()
from agents.orchestrator import run_pipeline
SAMPLE = (
"URGENT: Your account will be suspended in 24 hours! Click "
"http://secure-paypa1-verify.com/login now and verify your "
"identity or send a $50 gift card to avoid suspension."
)
async def main():
r = await run_pipeline(text=SAMPLE, verbose=True)
print("\n=== raw return value ===")
print(f"type(r) = {type(r)}")
print(json.dumps(r, indent=2, default=str))
if __name__ == "__main__":
asyncio.run(main()) |