diff --git a/app/routes/origin-flow.tsx b/app/routes/origin-flow.tsx index b5b8de0..5617ec6 100644 --- a/app/routes/origin-flow.tsx +++ b/app/routes/origin-flow.tsx @@ -13,9 +13,9 @@ export default function OriginFlow() { const cached = ORIGIN_PRESETS.find((item) => item.id === id)!; const preset = result?.preset ?? cached; const total = preset.sources.reduce((sum, item) => sum + item.count, 0); const japan = preset.sources.filter((item) => item.country === "日本").reduce((sum, item) => sum + item.count, 0); const unknown = preset.sources.filter((item) => item.country === "不明").reduce((sum, item) => sum + item.count, 0); const overseas = total - japan - unknown; const referenced = preset.expected.filter((item) => preset.sources.some((source) => source.domain === item.domain)).length; const gap = preset.expected.length ? Math.round(100 * (1 - referenced / preset.expected.length)) : null; - async function measure(event: React.FormEvent) { event.preventDefault(); if (!topic.trim() || !model.trim()) return; setLoading(true); setError(""); setResult(null); setIdeal(false); try { const response = await fetch("/api/measure", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ topic, model }) }); const data = await response.json() as Measurement & { error?: string }; if (!response.ok) throw new Error(data.error ?? "測定に失敗しました。"); setResult(data); } catch (reason) { setError(reason instanceof Error ? reason.message : "測定に失敗しました。"); } finally { setLoading(false); } } + async function measure(event: React.FormEvent) { event.preventDefault(); if (!topic.trim()) return; setLoading(true); setError(""); setResult(null); setIdeal(false); try { const response = await fetch("/api/measure", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ topic, model }) }); const data = await response.json() as Measurement & { error?: string }; if (!response.ok) throw new Error(data.error ?? "測定に失敗しました。"); setResult(data); } catch (reason) { setError(reason instanceof Error ? reason.message : "測定に失敗しました。"); } finally { setLoading(false); } } return

ORIGIN FLOW / AI参照情報源の発信国

AIは、どこの情報を根拠にしたか。

ナラティブを入力すると、Web検索付きAI回答と参照情報源の発信国・種別を表示します。

-