feat: WTI/Brent via Stooq, PMI scraping (TE), Groq replace Bytez

- drivers: switch Brent (cb.f) and WTI (cl.f) from stale FRED to Stooq
  near-real-time futures — same stooqMetal() already used for gold/silver
- macro: add scrapePMI() to scrape Trading Economics meta description for
  manufacturing-pmi and services-pmi for all 8 currencies (no API key needed)
- narrative: replace dead Bytez API with Groq (OpenAI-compatible, free tier)
  env var renamed BYTEZ_API_KEY → GROQ_API_KEY, model llama-3.1-8b-instant
- NarrativeButton: rebrand "Erreur Bytez" / "Bytez AI" → "Erreur IA" / "Groq AI"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Capucine Gest
2026-05-28 22:52:49 +02:00
co-authored by Claude Sonnet 4.6
parent 0a42e93d01
commit ecb815619b
4 changed files with 99 additions and 20 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ export default function NarrativeButton({ currency, indicators, macroScore }: Pr
{error && (
<span className="text-[10px] text-red-500 truncate max-w-[140px]" title={error}>
Erreur Bytez
Erreur IA
</span>
)}
@@ -66,7 +66,7 @@ export default function NarrativeButton({ currency, indicators, macroScore }: Pr
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2">
<Sparkles size={15} className="text-indigo-500" />
<span className="font-medium text-sm">Analyse {currency} Bytez AI</span>
<span className="font-medium text-sm">Analyse {currency} Groq AI</span>
</div>
<button onClick={() => setOpen(false)} className="text-gray-400 hover:text-gray-700">
<X size={15} />
@@ -74,7 +74,7 @@ export default function NarrativeButton({ currency, indicators, macroScore }: Pr
</div>
<p className="text-sm text-gray-700 leading-relaxed whitespace-pre-wrap">{analysis}</p>
<div className="mt-3 text-[10px] text-gray-400 text-right">
Powered by Bytez · Llama 3.1 8B
Powered by Groq · Llama 3.1 8B
</div>
</div>
</div>