Spaces:
Build error
Build error
File size: 2,043 Bytes
fab9847 | 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:8765';
export async function fetchBenchmarks() {
const res = await fetch(`${API_BASE}/api/benchmarks`);
return res.json();
}
export async function fetchResults(benchmark) {
const res = await fetch(`${API_BASE}/api/results/${benchmark}`);
return res.json();
}
export async function fetchEval(benchmark) {
const res = await fetch(`${API_BASE}/api/eval/${benchmark}`);
return res.json();
}
export async function fetchNlg(benchmark) {
const res = await fetch(`${API_BASE}/api/nlg/${benchmark}`);
return res.json();
}
export async function fetchScenarios() {
const res = await fetch(`${API_BASE}/api/scenarios`);
return res.json();
}
export async function fetchRegime() {
const res = await fetch(`${API_BASE}/api/regime`);
return res.json();
}
export async function fetchHedging() {
const res = await fetch(`${API_BASE}/api/hedging`);
return res.json();
}
export async function fetchBacktest() {
const res = await fetch(`${API_BASE}/api/backtest`);
return res.json();
}
export async function fetchAblation() {
const res = await fetch(`${API_BASE}/api/ablation`);
return res.json();
}
export async function fetchQuality() {
const res = await fetch(`${API_BASE}/api/quality`);
return res.json();
}
export async function fetchLineage() {
const res = await fetch(`${API_BASE}/api/lineage`);
return res.json();
}
export async function fetchFeatSel() {
const res = await fetch(`${API_BASE}/api/feat_sel`);
return res.json();
}
export async function fetchCausal() {
const res = await fetch(`${API_BASE}/api/causal`);
return res.json();
}
export async function fetchEvents() {
const res = await fetch(`${API_BASE}/api/events`);
return res.json();
}
export async function sendChat(message, sessionId) {
const res = await fetch(`${API_BASE}/api/chat`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message, session_id: sessionId }),
});
return res.json();
}
|