Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: export token usage from Profile stats as CSV (#14213)
Daniel Hancdcc9e774633
diff --git a/studio/backend/routes/profile_stats.py b/studio/backend/routes/profile_stats.pyindex 4d81ca2049e..b9b13913205 100644--- a/studio/backend/routes/profile_stats.py+++ b/studio/backend/routes/profile_stats.py@@ -6,9 +6,11 @@"""import asyncio+from datetime import datefrom typing import Anyfrom fastapi import APIRouter, Depends, Query+from fastapi.responses import Responsefrom auth.authentication import get_current_subjectfrom loggers import get_logger@@ -16,6 +18,7 @@ from storage.profile_stats_db import (MAX_DAILY_DAYS,MAX_TZ_OFFSET_MINUTES,compute_profile_stats,+ export_usage_csv,)from utils.utils import log_and_http_error@@ -46,3 +49,27 @@ async def get_profile_stats(raise log_and_http_error(exc, 500, "Failed to compute profile statistics", log = logger) from exc++[email protected]("/stats/export")+async def export_profile_usage(+ tz_offset_minutes: int = Query(0, ge = -MAX_TZ_OFFSET_MINUTES, le = MAX_TZ_OFFSET_MINUTES),+ tz: str = Query("", max_length = 64),+ current_subject: str = Depends(get_current_subject),+) -> Response:+ """The token usage behind the stats as CSV, one row per chat response or API request."""+ try:+ body = await asyncio.to_thread(+ export_usage_csv,+ tz_offset_minutes = tz_offset_minutes,+ tz_name = tz,+ subject = current_subject,+ )+ except Exception as exc:+ raise log_and_http_error(exc, 500, "Failed to export token usage", log = logger) from exc+ filename = f"unsloth-token-usage-{date.today().isoformat()}.csv"+ return Response(+ content = body,+ media_type = "text/csv; charset=utf-8",+ headers = {"Content-Disposition": f'attachment; filename="{filename}"'},+ )diff --git a/studio/backend/storage/profile_stats_db.py b/studio/backend/storage/profile_stats_db.pyindex 72341661784..31eef345f31 100644--- a/studio/backend/storage/profile_stats_db.py+++ b/studio/backend/storage/profile_stats_db.py@@ -14,12 +14,14 @@ in that single pass, then memoised against per-source count/timestamp fingerprinis free until history changes."""+import csv+import ioimport jsonimport threadingimport timefrom datetime import date, datetime, timedelta, timezonefrom zoneinfo import ZoneInfo, ZoneInfoNotFoundError-from typing import Any, Optional+from typing import Any, Callable, Optionalfrom loggers import get_logger@@ -44,6 +46,20 @@ RECENT_RUNS = 5# mid-stream still refreshes promptly.CACHE_TTL_SECONDS = 20.0+USAGE_CSV_COLUMNS = (+ "time",+ "date",+ "source",+ "model",+ "prompt_tokens",+ "completion_tokens",+ "total_tokens",+ "cached_tokens",+)++# (created_at_ms, source, model_id, prompt, completion, total, cached) for each counted response.+UsageSink = Callable[[int, str, str, int, int, int, int], None]+_cache_lock = threading.Lock()_cache: dict[str, dict[str, Any]] = {}@@ -193,7 +209,12 @@ class _ApiUsageFold:self.requests = 0-def _fold_api_usage(conn, zone, subject: str) -> _ApiUsageFold:+def _fold_api_usage(+ conn,+ zone,+ subject: str,+ on_usage: Optional[UsageSink] = None,+) -> _ApiUsageFold:fold = _ApiUsageFold()rows = conn.execute("""@@ -214,12 +235,15 @@ def _fold_api_usage(conn, zone, subject: str) -> _ApiUsageFold:fold.total_tokens += total_tokensfold.requests += 1- stamp = _local_stamp(_as_int(row["created_at"]), zone)+ created_at = _as_int(row["created_at"])+ stamp = _local_stamp(created_at, zone)if stamp is not None:day = stamp.date()fold.by_day[day] = fold.by_day.get(day, 0) + total_tokensmodel_id = _clean_str(row["model"])+ if on_usage is not None:+ on_usage(created_at, "api", model_id, prompt_tokens, completion_tokens, total_tokens, 0)if model_id:model = fold.models.setdefault(model_id,@@ -292,7 +316,11 @@ def _surviving_original_keys(conn) -> set[tuple[str, int, str]]:return {(row["thread_id"], _as_int(row["created_at"]), row["role"]) for row in rows}-def _fold_messages(conn, zone) -> _MessageFold:+def _fold_messages(+ conn,+ zone,+ on_usage: Optional[UsageSink] = None,+) -> _MessageFold:fold = _MessageFold()keepers = _fork_keepers(conn)surviving = _surviving_original_keys(conn)@@ -405,12 +433,11 @@ def _fold_messages(conn, zone) -> _MessageFold:if total_tokens == 0:total_tokens = prompt_tokens + completion_tokens+ cached_tokens = _as_int(usage.get("cachedTokens")) or _as_int(server.get("cache_n"))fold.prompt_tokens += prompt_tokensfold.completion_tokens += completion_tokensfold.total_tokens += total_tokens- fold.cached_tokens += _as_int(usage.get("cachedTokens")) or _as_int(- server.get("cache_n")- )+ fold.cached_tokens += cached_tokensfold.tool_calls += _as_int(timing.get("toolCallCount"))message_tokens = total_tokens@@ -423,6 +450,16 @@ def _fold_messages(conn, zone) -> _MessageFold:)if model_id:fold.note_model(model_id, message_tokens)+ if on_usage is not None:+ on_usage(+ created_at,+ "chat",+ model_id,+ prompt_tokens,+ completion_tokens,+ total_tokens,+ cached_tokens,+ )speed = _as_float(timing.get("tokensPerSecond"))# llama.cpp reports absurd rates on no-op turns; ignore those.@@ -736,3 +773,56 @@ def compute_profile_stats(def invalidate_profile_stats_cache() -> None:with _cache_lock:_cache.pop(current_account_id(), None)+++def _csv_text(value: str) -> str:+ """Model ids are client-supplied; a leading formula character would run as a formula in a spreadsheet."""+ return "'" + value if value[:1] in ("=", "+", "-", "@", "\t", "\r") else value+++def export_usage_csv(+ tz_offset_minutes: int = 0,+ tz_name: str = "",+ *,+ subject: str = "",+) -> str:+ """One CSV row per counted chat response or API request, oldest first, in the caller's timezone.+ Counted by the same folds as ``compute_profile_stats`` with the same scoping (chat install-wide,+ API receipts only for ``subject``), so the totals match the Profile tab."""+ tz_offset_minutes = max(+ -MAX_TZ_OFFSET_MINUTES, min(int(tz_offset_minutes), MAX_TZ_OFFSET_MINUTES)+ )+ zone = _resolve_zone(tz_name, tz_offset_minutes)+ subject = canonical_api_subject(subject)+ rows: list[tuple[int, str, str, int, int, int, int]] = []++ def collect(*row) -> None:+ if row[3] or row[4] or row[5]:+ rows.append(row)++ conn = get_connection()+ try:+ _fold_messages(conn, zone, on_usage = collect)+ _fold_api_usage(conn, zone, subject, on_usage = collect)+ finally:+ conn.close()+ rows.sort(key = lambda row: row[0])++ out = io.StringIO()+ writer = csv.writer(out, lineterminator = "\n")+ writer.writerow(USAGE_CSV_COLUMNS)+ for created_at, source, model_id, prompt, completion, total, cached in rows:+ stamp = _local_stamp(created_at, zone)+ writer.writerow(+ [+ stamp.strftime("%Y-%m-%d %H:%M:%S") if stamp else "",+ _iso(stamp.date()) if stamp else "",+ source,+ _csv_text(model_id),+ prompt,+ completion,+ total,+ cached,+ ]+ )+ return out.getvalue()diff --git a/studio/backend/tests/test_account_chat_settings.py b/studio/backend/tests/test_account_chat_settings.pyindex 420332e347f..532c8c3c895 100644--- a/studio/backend/tests/test_account_chat_settings.py+++ b/studio/backend/tests/test_account_chat_settings.py@@ -670,6 +670,28 @@ def test_api_usage_statistics_read_only_the_account_database(client):assert "bob-model" not in response.text+def test_usage_export_reads_only_the_account_database(client):+ receipt = api_usage_db.ApiUsageReceipt(+ id = "receipt",+ subject = "bob",+ endpoint = "/v1/chat/completions",+ model = "bob-model",+ status = "completed",+ prompt_tokens = 10,+ completion_tokens = 20,+ total_tokens = 30,+ created_at = 1,+ via_api_key = True,+ )+ run_as(BOB, api_usage_db.record_api_usage, receipt)+ as_bob = client.get("/profile/stats/export", headers = {"x-test-account": "bob"})+ assert as_bob.status_code == 200, as_bob.text+ assert "bob-model" in as_bob.text+ response = client.get("/profile/stats/export")+ assert response.status_code == 200, response.text+ assert "bob-model" not in response.text++def test_single_account_cancel_still_calls_the_original_supervisor(monkeypatch):monkeypatch.setattr(policy, "installation_is_multi_user", lambda: False)calls = []diff --git a/studio/backend/tests/test_api_profile_usage_routes.py b/studio/backend/tests/test_api_profile_usage_routes.pyindex 75f2c440d91..e112e1928b1 100644--- a/studio/backend/tests/test_api_profile_usage_routes.py+++ b/studio/backend/tests/test_api_profile_usage_routes.py@@ -75,3 +75,25 @@ def test_profile_endpoint_forwards_each_authenticated_subject(monkeypatch):active["subject"] = "bob"assert client.get("/api/profile/stats").json() == {"subject": "bob"}assert seen == ["alice", "bob"]+++def test_usage_export_forwards_the_subject_and_downloads_csv(monkeypatch):+ seen: list[dict] = []++ def fake_export(**kwargs):+ seen.append(kwargs)+ return "time,date\n"++ monkeypatch.setattr(profile_stats_route, "export_usage_csv", fake_export)+ app = FastAPI()+ app.include_router(profile_stats_route.router, prefix = "/api/profile")+ app.dependency_overrides = {get_current_subject: lambda: "alice"}+ response = TestClient(app).get(+ "/api/profile/stats/export?tz=Europe/Paris&tz_offset_minutes=-60"+ )++ assert response.status_code == 200+ assert response.text == "time,date\n"+ assert response.headers["content-type"].startswith("text/csv")+ assert response.headers["content-disposition"].startswith("attachment; filename=")+ assert seen == [{"tz_offset_minutes": -60, "tz_name": "Europe/Paris", "subject": "alice"}]diff --git a/studio/backend/tests/test_profile_stats.py b/studio/backend/tests/test_profile_stats.pyindex 97bc99a5cf5..b7ab45e14df 100644--- a/studio/backend/tests/test_profile_stats.py+++ b/studio/backend/tests/test_profile_stats.py@@ -1795,3 +1795,61 @@ def test_inline_media_counts_as_attachments_without_double_counting(stats_db):# The image appears in both storage representations and twice inline.assert totals["attachments"] == 2+++def test_usage_csv_export_matches_profile_totals_and_scopes_api_rows(stats_db):+ import csv+ import io++ from storage.profile_stats_db import USAGE_CSV_COLUMNS, export_usage_csv++ day = datetime(2026, 3, 4, 12, 0, tzinfo = timezone.utc)+ conn = studio_db.get_connection()+ try:+ _seed_thread(+ conn,+ "export",+ "unused-thread-model",+ [(day, _metadata(100, 25)), (day + timedelta(hours = 2), _metadata(300, 50))],+ )+ conn.commit()+ finally:+ conn.close()+ assert record_api_usage(_api_receipt("mine", day + timedelta(hours = 1), model = "=HYPERLINK(1)"))+ assert record_api_usage(_api_receipt("theirs", day, subject = "someone-else", total = 999))++ text = export_usage_csv(tz_name = "UTC", subject = "external-client")+ rows = list(csv.reader(io.StringIO(text)))++ assert tuple(rows[0]) == USAGE_CSV_COLUMNS+ assert rows[1:] == [+ [+ "2026-03-04 12:00:10",+ "2026-03-04",+ "chat",+ "unsloth/gpt-oss-20b",+ "100",+ "25",+ "125",+ "5",+ ],+ ["2026-03-04 13:00:00", "2026-03-04", "api", "'=HYPERLINK(1)", "40", "10", "50", "0"],+ [+ "2026-03-04 14:00:10",+ "2026-03-04",+ "chat",+ "unsloth/gpt-oss-20b",+ "300",+ "50",+ "350",+ "5",+ ],+ ]+ totals = compute_profile_stats(days = 7, tz_name = "UTC", subject = "external-client")["totals"]+ assert sum(int(row[6]) for row in rows[1:]) == totals["totalTokens"]+ assert export_usage_csv(tz_name = "UTC", subject = "external-client") == text+++def test_usage_csv_export_is_header_only_without_history(stats_db):+ from storage.profile_stats_db import USAGE_CSV_COLUMNS, export_usage_csv+ assert export_usage_csv(subject = "external-client") == ",".join(USAGE_CSV_COLUMNS) + "\n"diff --git a/studio/frontend/src/features/profile/api/profile-stats.ts b/studio/frontend/src/features/profile/api/profile-stats.tsindex 665c36c31bf..fe508dde373 100644--- a/studio/frontend/src/features/profile/api/profile-stats.ts+++ b/studio/frontend/src/features/profile/api/profile-stats.ts@@ -89,20 +89,35 @@ export type ProfileStats = {};};+// Bucket days and hours in this browser's timezone, which is not the server's+// when Unsloth is reached over the network. The IANA name is what gives each+// historical date its own daylight-saving offset; the current offset only+// covers callers whose host cannot resolve the name.+function timezoneQuery(): URLSearchParams {+ return new URLSearchParams({+ tz_offset_minutes: String(new Date().getTimezoneOffset()),+ tz: Intl.DateTimeFormat().resolvedOptions().timeZone ?? "",+ });+}+export async function loadProfileStats(signal?: AbortSignal,): Promise<ProfileStats> {- // Bucket days and hours in this browser's timezone, which is not the- // server's when Unsloth is reached over the network. The IANA name is what- // gives each historical date its own daylight-saving offset; the current- // offset only covers callers whose host cannot resolve the name.- const query = new URLSearchParams({- tz_offset_minutes: String(new Date().getTimezoneOffset()),- tz: Intl.DateTimeFormat().resolvedOptions().timeZone ?? "",+ const res = await authFetch(`/api/profile/stats?${timezoneQuery()}`, {+ signal,});- const res = await authFetch(`/api/profile/stats?${query}`, { signal });if (!res.ok) {throw new Error(await readFastApiError(res, "Failed to load your stats"));}return (await res.json()) as ProfileStats;}++export async function exportProfileUsageCsv(): Promise<string> {+ const res = await authFetch(`/api/profile/stats/export?${timezoneQuery()}`);+ if (!res.ok) {+ throw new Error(+ await readFastApiError(res, "Failed to export your token usage"),+ );+ }+ return await res.text();+}diff --git a/studio/frontend/src/features/profile/components/stats/export-usage-button.tsx b/studio/frontend/src/features/profile/components/stats/export-usage-button.tsxnew file mode 100644index 00000000000..6cc894bf08d--- /dev/null+++ b/studio/frontend/src/features/profile/components/stats/export-usage-button.tsx@@ -0,0 +1,54 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import { Button } from "@/components/ui/button";+import { useT } from "@/i18n";+import { downloadFile, isDownloadCancelled } from "@/lib/native-files";+import { toast } from "@/lib/toast";+import { Download01Icon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";+import { useState } from "react";+import { exportProfileUsageCsv } from "../../api/profile-stats";++function localDateStamp(now = new Date()): string {+ const pad = (value: number) => String(value).padStart(2, "0");+ return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;+}++export function ExportUsageButton() {+ const t = useT();+ const [busy, setBusy] = useState(false);++ const onExport = async () => {+ setBusy(true);+ try {+ const csv = await exportProfileUsageCsv();+ await downloadFile(+ csv,+ `unsloth-token-usage-${localDateStamp()}.csv`,+ "text/csv",+ );+ } catch (error) {+ if (!isDownloadCancelled(error)) {+ toast.error(t("settings.profile.stats.exportError"), {+ description: error instanceof Error ? error.message : undefined,+ });+ }+ } finally {+ setBusy(false);+ }+ };++ return (+ <Button+ type="button"+ size="sm"+ variant="outline"+ disabled={busy}+ onClick={() => void onExport()}+ >+ <HugeiconsIcon icon={Download01Icon} className="size-3.5" />+ {t("settings.profile.stats.exportCsv")}+ </Button>+ );+}diff --git a/studio/frontend/src/features/profile/components/stats/profile-stats-content.tsx b/studio/frontend/src/features/profile/components/stats/profile-stats-content.tsxindex 135274c26c2..de72a3f17b5 100644--- a/studio/frontend/src/features/profile/components/stats/profile-stats-content.tsx+++ b/studio/frontend/src/features/profile/components/stats/profile-stats-content.tsx@@ -4,6 +4,7 @@import { Button } from "@/components/ui/button";import { useT } from "@/i18n";import { useProfileStats } from "../../hooks/use-profile-stats";+import { ExportUsageButton } from "./export-usage-button";import { ActivityInsightsCard, TopModelsCard } from "./insights-card";import { StatsCard } from "./stat-primitives";import { StatsHighlights } from "./stats-highlights";@@ -48,16 +49,19 @@ export function ProfileStatsContent() {return (<div className="flex w-full flex-col gap-4">- <header className="flex flex-col gap-0.5">- <h2- data-settings-label={t("settings.profile.stats.title")}- className="settings-heading text-base font-semibold font-heading"- >- {t("settings.profile.stats.title")}- </h2>- <p className="text-xs text-muted-foreground">- {t("settings.profile.stats.subtitle")}- </p>+ <header className="flex items-start justify-between gap-3">+ <div className="flex flex-col gap-0.5">+ <h2+ data-settings-label={t("settings.profile.stats.title")}+ className="settings-heading text-base font-semibold font-heading"+ >+ {t("settings.profile.stats.title")}+ </h2>+ <p className="text-xs text-muted-foreground">+ {t("settings.profile.stats.subtitle")}+ </p>+ </div>+ {hasUsage ? <ExportUsageButton /> : null}</header><StatsHighlights stats={stats} />diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 097194b216a..7a6fdf9a297 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -2024,6 +2024,8 @@ export const ar = {subtitle:"كل ما يلي محسوب من سجلك الخاص. لا يُجمَع أي شيء ولا يُرسَل إلى Unsloth.",retry: "إعادة المحاولة",+ exportCsv: "تصدير CSV",+ exportError: "تعذر تصدير استخدام التوكنات",privacyNote:"تُحسب الإحصاءات من سجل المحادثات واستخدام API والتدريب المحلي في نسخة Unsloth لديك. لا تُحفظ مطالبات API أو ردوده أو مفاتيحه للإحصاءات، ولا يُرسل شيء إلى Unsloth أو أي طرف ثالث.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex 4a1e6c9665e..0d94727e8d7 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -2052,6 +2052,8 @@ export const de = {subtitle:"Alles Folgende wird aus Ihrem eigenen Verlauf berechnet. Es wird nichts erfasst oder an Unsloth gesendet.",retry: "Erneut versuchen",+ exportCsv: "Als CSV exportieren",+ exportError: "Token-Nutzung konnte nicht exportiert werden",privacyNote:"Die Statistiken werden aus dem lokalen Chat-, API-Nutzungs- und Trainingsverlauf Ihrer Unsloth-Installation berechnet. API-Eingaben, -Antworten und -Schlüssel werden dafür nie gespeichert. Nichts wird an Unsloth oder Dritte gesendet.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 8eed2d0115a..c7b2fd37f5b 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -2077,6 +2077,8 @@ export const en = {subtitle:"Everything below is counted from your own history. Nothing is collected or sent to Unsloth.",retry: "Try again",+ exportCsv: "Export CSV",+ exportError: "Couldn't export your token usage",privacyNote:"Stats are computed from local chat, API usage, and training history held by your Unsloth install. API prompts, responses, and keys are never stored for stats. Nothing is sent to Unsloth or any third party.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 651a5e96c3d..f30e3481db6 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -2047,6 +2047,8 @@ export const es = {subtitle:"Todo lo que aparece a continuación se calcula a partir de tu propio historial. No se recopila ni se envía nada a Unsloth.",retry: "Volver a intentar",+ exportCsv: "Exportar CSV",+ exportError: "No se pudo exportar el uso de tokens",privacyNote:"Las estadísticas se calculan a partir del historial local de chats, uso de la API y entrenamientos de tu instalación de Unsloth. Nunca se guardan solicitudes, respuestas ni claves de API para las estadísticas. No se envía nada a Unsloth ni a terceros.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex c99b6ce108d..877fa9679c8 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -2051,6 +2051,8 @@ export const fr = {subtitle:"Tout ce qui suit est calculé à partir de votre propre historique. Rien n'est collecté ni envoyé à Unsloth.",retry: "Réessayer",+ exportCsv: "Exporter en CSV",+ exportError: "Impossible d'exporter l'utilisation des tokens",privacyNote:"Les statistiques sont calculées à partir de l'historique local des discussions, de l'utilisation de l'API et des entraînements de votre installation Unsloth. Les requêtes, réponses et clés API ne sont jamais stockées pour les statistiques. Rien n'est envoyé à Unsloth ni à un tiers.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 6270a1634ec..69d0c75c1ec 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -2119,6 +2119,8 @@ export const he = {subtitle:"כל המידע למטה מחושב מההיסטוריה המקומית שלך. שום מידע אינו נאסף או נשלח ל-Unsloth.",retry: "נסה שוב",+ exportCsv: "ייצוא ל-CSV",+ exportError: "לא ניתן לייצא את השימוש בטוקנים",privacyNote:"הסטטיסטיקות מחושבות מצ'אטים מקומיים, שימוש ב-API והיסטוריית אימונים המאוחסנת בהתקנת Unsloth שלך. פרומפטים, תשובות ומפתחות API אינם נשמרים לעולם לצורך סטטיסטיקות. שום דבר אינו נשלח ל-Unsloth או לצד שלישי כלשהו.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 013d148c7e9..ab00026feb7 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -2030,6 +2030,8 @@ export const hi = {subtitle:"नीचे सब कुछ आपके अपने इतिहास से गिना जाता है। कुछ भी इकट्ठा नहीं किया जाता और न ही Unsloth को भेजा जाता है।",retry: "फिर कोशिश करें",+ exportCsv: "CSV निर्यात करें",+ exportError: "टोकन उपयोग निर्यात नहीं हो सका",privacyNote:"आँकड़े आपके Unsloth इंस्टॉल के स्थानीय चैट, API उपयोग और ट्रेनिंग इतिहास से गिने जाते हैं। आँकड़ों के लिए API प्रॉम्प्ट, जवाब या कुंजियाँ कभी संग्रहीत नहीं होतीं। Unsloth या किसी तीसरे पक्ष को कुछ नहीं भेजा जाता।",emptyChats:diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex 923ee62ec4a..d655bcd015d 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -1956,6 +1956,8 @@ export const it = {subtitle:"Tutto quello che vedi qui è calcolato dalla tua cronologia. Nessun dato viene raccolto o inviato a Unsloth.",retry: "Riprova",+ exportCsv: "Esporta CSV",+ exportError: "Impossibile esportare l'utilizzo dei token",privacyNote:"Le statistiche sono calcolate dalla cronologia locale di chat, utilizzo API e addestramenti della tua installazione di Unsloth. Prompt, risposte e chiavi API non vengono mai salvati per le statistiche. Nulla viene inviato a Unsloth o a terze parti.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 2c05cb8b87c..237a2907a0e 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -2004,6 +2004,8 @@ export const ja = {subtitle:"以下はすべてご自身の履歴から集計しています。収集も Unsloth への送信も行いません。",retry: "再試行",+ exportCsv: "CSV をエクスポート",+ exportError: "トークン使用量をエクスポートできませんでした",privacyNote:"統計は、お使いの Unsloth にあるローカルのチャット、API 利用、トレーニング履歴から計算されます。統計用に API のプロンプト、応答、キーを保存することはありません。Unsloth や第三者への送信も行いません。",emptyChats:diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex e8a912ef90f..ce57f00e337 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -2018,6 +2018,8 @@ export const ko = {subtitle:"아래 내용은 모두 본인의 기록을 바탕으로 계산됩니다. 아무것도 수집하거나 Unsloth로 전송하지 않습니다.",retry: "다시 시도",+ exportCsv: "CSV 내보내기",+ exportError: "토큰 사용량을 내보낼 수 없습니다",privacyNote:"통계는 Unsloth 설치에 저장된 로컬 채팅, API 사용 및 학습 기록을 바탕으로 계산됩니다. 통계를 위해 API 프롬프트, 응답 또는 키를 저장하지 않습니다. Unsloth나 제3자에게 아무것도 전송하지 않습니다.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex 547c67eb663..caafc97acf3 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -2039,6 +2039,8 @@ export const ptBR = {subtitle:"Tudo abaixo é calculado a partir do seu próprio histórico. Nada é coletado nem enviado ao Unsloth.",retry: "Tentar novamente",+ exportCsv: "Exportar CSV",+ exportError: "Não foi possível exportar o uso de tokens",privacyNote:"As estatísticas são calculadas a partir do histórico local de chats, uso da API e treinos da sua instalação do Unsloth. Prompts, respostas e chaves da API nunca são salvos para as estatísticas. Nada é enviado ao Unsloth ou a terceiros.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 9d8c4b85dd7..36d1a65f31e 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -2033,6 +2033,8 @@ export const ru = {subtitle:"Всё ниже считается по вашей собственной истории. Ничего не собирается и не отправляется в Unsloth.",retry: "Повторить",+ exportCsv: "Экспорт в CSV",+ exportError: "Не удалось экспортировать использование токенов",privacyNote:"Статистика рассчитывается по локальной истории чатов, использования API и обучения в вашей установке Unsloth. Запросы, ответы и ключи API для статистики никогда не сохраняются. Ничего не отправляется ни в Unsloth, ни третьим лицам.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex 5d65dd10848..379d18f68e5 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -2192,6 +2192,8 @@ export const sv = {subtitle:"Allt nedan räknas från din egen historik. Ingenting samlas in eller skickas till Unsloth.",retry: "Försök igen",+ exportCsv: "Exportera CSV",+ exportError: "Det gick inte att exportera tokenanvändningen",privacyNote:"Statistiken beräknas från lokal chatt, API-användning och träningshistorik som lagras av din Unsloth-installation. API-uppmaningar, svar och nycklar lagras aldrig för statistik. Ingenting skickas till Unsloth eller tredje part.",emptyChats:diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 1353f8c5743..86bbfb3da1a 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -2000,6 +2000,8 @@ export const zhCN = {subtitle:"下面的内容全部根据你自己的历史记录统计。不会收集任何数据,也不会发送给 Unsloth。",retry: "重试",+ exportCsv: "导出 CSV",+ exportError: "无法导出 token 用量",privacyNote:"统计数据由本地 Unsloth 的聊天、API 使用和训练历史计算得出。统计功能绝不会保存 API 提示词、回复或密钥,也不会向 Unsloth 或任何第三方发送数据。",emptyChats: "暂无聊天或 API 使用记录。请开始一段对话,或发起经过认证的本地 API 请求。",