add agent workspace

This commit is contained in:
2026-02-18 22:39:35 -08:00
commit e8389b8772
48 changed files with 3476 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""Test single email analysis"""
import requests
import json
email_data = {
"subject": "Fwd: Get 10% off your next order 🎉",
"sender": "crac1017@hotmail.com",
"body": "Get 10% off your next order! Limited time offer. Shop now and save!"
}
prompt = f"""Analyze this email and determine if it's an advertisement/promotional email.
Subject: {email_data['subject']}
Sender: {email_data['sender']}
Body preview: {email_data['body'][:200]}
Is this an advertisement or promotional email? Answer with ONLY:
- "AD: [brief reason]" if it's an ad/promo
- "KEEP: [brief reason]" if it's important/legitimate
Be conservative - only mark as AD if clearly promotional."""
print("Sending to Qwen3...")
try:
response = requests.post(
"http://localhost:11434/api/generate",
json={
"model": "qwen3:4b",
"prompt": prompt,
"stream": False
},
timeout=120
)
result = response.json()
print(f"Result: {result.get('response', 'error')}")
except Exception as e:
print(f"Error: {e}")