diff --git a/.silo-translations b/.silo-translations index 651b3ce08bc..eba90198cda 100644 --- a/.silo-translations +++ b/.silo-translations @@ -1,3 +1,3 @@ platform=web -version=2026.12.04-33caf4c -sha256=723c634e16477058be2de4bf65b5f43393c9152de738f8df1d6aa66a94c03152 +version=2026.12.04-0b3cec1 +sha256=c6d8d85b1b97fad7089f605a524389e0780913bad094c09cffbebf2fea9e442a diff --git a/cmd/silo/main.go b/cmd/silo/main.go index 5eefe05b620..278282c974e 100644 --- a/cmd/silo/main.go +++ b/cmd/silo/main.go @@ -44,6 +44,7 @@ import ( "github.com/Silo-Server/silo-server/internal/access" "github.com/Silo-Server/silo-server/internal/activitylog" "github.com/Silo-Server/silo-server/internal/adminjob" + aiusage "github.com/Silo-Server/silo-server/internal/ai/usage" "github.com/Silo-Server/silo-server/internal/animeids" "github.com/Silo-Server/silo-server/internal/api" "github.com/Silo-Server/silo-server/internal/api/handlers" @@ -3215,7 +3216,8 @@ func main() { userStoreProvider, cfg.Recommendations, ).WithUnratedContentPolicy(unratedContent). - WithUserStoreOutsidePostgres(cfg.UserDB.Backend == "sqlite") + WithUserStoreOutsidePostgres(cfg.UserDB.Backend == "sqlite"). + WithUsageRecorder(aiusage.NewStore(deps.DB, slog.Default())) if userStoreProvider != nil { // Cached rows are built under the scope the API resolves for the // profile's own requests, so reads do not filter them down. diff --git a/contracts/api/v2/fixtures/get_admin_insights_ai_ok.json b/contracts/api/v2/fixtures/get_admin_insights_ai_ok.json new file mode 100644 index 00000000000..18689f50376 --- /dev/null +++ b/contracts/api/v2/fixtures/get_admin_insights_ai_ok.json @@ -0,0 +1,80 @@ +{ + "from": "2025-12-04T00:00:00.000Z", + "to": "2026-01-02T03:04:05.678Z", + "tracking_since": "2025-11-23", + "summary": { + "requests": 848, + "input_tokens": 1640000, + "cached_input_tokens": 610000, + "output_tokens": 1280000, + "total_tokens": 2920000, + "audio_seconds": 14400 + }, + "models": [ + { + "requests": 812, + "input_tokens": 1640000, + "cached_input_tokens": 610000, + "output_tokens": 1280000, + "total_tokens": 2920000, + "audio_seconds": 0, + "key": "openai-1/gpt-5-mini", + "provider_id": "openai-1", + "provider_name": "OpenAI", + "provider_type": "openai", + "model": "gpt-5-mini" + }, + { + "requests": 36, + "input_tokens": 0, + "cached_input_tokens": 0, + "output_tokens": 0, + "total_tokens": 0, + "audio_seconds": 14400, + "key": "groq-1/whisper-large-v3-turbo", + "provider_id": "groq-1", + "provider_name": "Groq", + "provider_type": "groq", + "model": "whisper-large-v3-turbo" + } + ], + "features": [ + { + "requests": 812, + "input_tokens": 1640000, + "cached_input_tokens": 610000, + "output_tokens": 1280000, + "total_tokens": 2920000, + "audio_seconds": 0, + "feature": "subtitle_translation", + "models": [ + "gpt-5-mini" + ] + }, + { + "requests": 36, + "input_tokens": 0, + "cached_input_tokens": 0, + "output_tokens": 0, + "total_tokens": 0, + "audio_seconds": 14400, + "feature": "transcription", + "models": [ + "whisper-large-v3-turbo" + ] + } + ], + "points": [ + { + "date": "2026-01-02", + "input_tokens": 1640000, + "output_tokens": 1280000, + "tokens_by_model": { + "openai-1/gpt-5-mini": 2920000 + }, + "tokens_by_feature": { + "subtitle_translation": 2920000 + } + } + ] +} diff --git a/contracts/api/v2/fixtures/get_admin_insights_capabilities_ok.json b/contracts/api/v2/fixtures/get_admin_insights_capabilities_ok.json index 57210889beb..8ae5ab556e2 100644 --- a/contracts/api/v2/fixtures/get_admin_insights_capabilities_ok.json +++ b/contracts/api/v2/fixtures/get_admin_insights_capabilities_ok.json @@ -1,5 +1,5 @@ { - "revision": "c15bec2f7888e7c57ea3349e2c03dce235defdff41c13fe60f105fe2abadd16a", + "revision": "d8fd0a1759b2d49466df6a05d9c6689d5bdb9664ff5e3138324eef4b51544a00", "state": "available", "allowed": true, "available": true, @@ -7,5 +7,6 @@ "titles": true, "profile_filter": true, "library": true, - "breakdowns": true + "breakdowns": true, + "ai_usage": true } diff --git a/contracts/api/v2/fixtures/index.json b/contracts/api/v2/fixtures/index.json index b6d2babe141..f36bcd1ef60 100644 --- a/contracts/api/v2/fixtures/index.json +++ b/contracts/api/v2/fixtures/index.json @@ -6765,6 +6765,27 @@ "schema": "#/components/schemas/AdminInsightsActivity", "body_file": "get_admin_insights_activity_ok.json" }, + { + "name": "get_admin_insights_ai_ok", + "operation_id": "getAdminInsightsAI", + "scenario": "Administrator insights AI usage returns token and audio totals per model, feature and UTC day.", + "request": { + "method": "GET", + "path": "/api/v2/admin/insights/ai?range=30d", + "headers": { + "Authorization": "Bearer tok-admin", + "X-Profile-Id": "p-primary" + } + }, + "expected_status": 200, + "response_headers": { + "Cache-Control": "no-store", + "Content-Type": "application/json" + }, + "response_media_type": "application/json", + "schema": "#/components/schemas/AdminInsightsAI", + "body_file": "get_admin_insights_ai_ok.json" + }, { "name": "get_admin_insights_bandwidth_ok", "operation_id": "getAdminInsightsBandwidth", @@ -6802,7 +6823,7 @@ "response_headers": { "Cache-Control": "private, no-cache", "Content-Type": "application/json", - "ETag": "\"ea9d806298fc07f74f668bef1fafe6cb0204503eb347122814111a4e25688ccc\"" + "ETag": "\"28557ec14946924c708f540561fff32f88b5aaa61e795d84dcd7a454112804fc\"" }, "response_media_type": "application/json", "schema": "#/components/schemas/AdminInsightsCapabilities", diff --git a/contracts/api/v2/openapi.json b/contracts/api/v2/openapi.json index 68dc52bc3a4..58bfe50c881 100644 --- a/contracts/api/v2/openapi.json +++ b/contracts/api/v2/openapi.json @@ -12797,6 +12797,286 @@ ], "type": "object" }, + "AdminInsightsAI": { + "additionalProperties": false, + "properties": { + "features": { + "description": "Per-feature totals, most tokens first, then most audio.", + "items": { + "$ref": "#/components/schemas/AdminInsightsAIFeature" + }, + "type": "array" + }, + "from": { + "description": "Start of the first UTC day read; usage is kept per UTC day, so a window in another timezone reads the UTC days it covers by date.", + "format": "date-time", + "pattern": "^(?:[1-9][0-9]{3}|0[1-9][0-9]{2}|00[1-9][0-9]|000[2-9])-", + "patternDescription": "a non-zero RFC 3339 instant", + "type": "string" + }, + "models": { + "description": "Per-model totals, most tokens first, then most audio.", + "items": { + "$ref": "#/components/schemas/AdminInsightsAIModel" + }, + "type": "array" + }, + "points": { + "description": "Daily UTC usage in ascending date order; days without usage are omitted.", + "items": { + "$ref": "#/components/schemas/AdminInsightsAIPoint" + }, + "type": "array" + }, + "summary": { + "$ref": "#/components/schemas/AdminInsightsAIUsage", + "description": "Window-wide totals." + }, + "to": { + "description": "End of the window: now, or for range=custom the exclusive end of the last UTC day read.", + "format": "date-time", + "pattern": "^(?:[1-9][0-9]{3}|0[1-9][0-9]{2}|00[1-9][0-9]|000[2-9])-", + "patternDescription": "a non-zero RFC 3339 instant", + "type": "string" + }, + "tracking_since": { + "description": "First UTC day (YYYY-MM-DD) Silo counted AI usage, or null when unknown. Earlier requests were not recorded.", + "format": "date", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "from", + "to", + "tracking_since", + "summary", + "models", + "features", + "points" + ], + "type": "object" + }, + "AdminInsightsAIFeature": { + "additionalProperties": false, + "properties": { + "audio_seconds": { + "description": "Seconds of audio transcribed; speech models report audio instead of tokens.", + "format": "double", + "type": "number" + }, + "cached_input_tokens": { + "description": "Input tokens the provider served from its prompt cache.", + "format": "int64", + "type": "integer" + }, + "feature": { + "description": "The Silo feature that made the requests.", + "enum": [ + "subtitle_translation", + "metadata_translation", + "transcription", + "embeddings", + "other" + ], + "type": "string" + }, + "input_tokens": { + "description": "Input tokens, cached input included.", + "format": "int64", + "type": "integer" + }, + "models": { + "description": "Models that served the feature, most tokens first.", + "items": { + "type": "string" + }, + "type": "array" + }, + "output_tokens": { + "description": "Output tokens, reasoning tokens included.", + "format": "int64", + "type": "integer" + }, + "requests": { + "description": "Provider requests answered, retries of a rejected answer included.", + "format": "int64", + "type": "integer" + }, + "total_tokens": { + "description": "input_tokens plus output_tokens.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "feature", + "models", + "requests", + "input_tokens", + "cached_input_tokens", + "output_tokens", + "total_tokens", + "audio_seconds" + ], + "type": "object" + }, + "AdminInsightsAIModel": { + "additionalProperties": false, + "properties": { + "audio_seconds": { + "description": "Seconds of audio transcribed; speech models report audio instead of tokens.", + "format": "double", + "type": "number" + }, + "cached_input_tokens": { + "description": "Input tokens the provider served from its prompt cache.", + "format": "int64", + "type": "integer" + }, + "input_tokens": { + "description": "Input tokens, cached input included.", + "format": "int64", + "type": "integer" + }, + "key": { + "description": "Identifies the provider's model in points[].tokens_by_model.", + "type": "string" + }, + "model": { + "type": "string" + }, + "output_tokens": { + "description": "Output tokens, reasoning tokens included.", + "format": "int64", + "type": "integer" + }, + "provider_id": { + "description": "AI provider the requests went to; \"chatgpt\" for a connected ChatGPT plan.", + "type": "string" + }, + "provider_name": { + "description": "The provider's current name; empty once the provider is removed.", + "type": "string" + }, + "provider_type": { + "description": "The provider's type, such as openai or ollama; empty once the provider is removed.", + "type": "string" + }, + "requests": { + "description": "Provider requests answered, retries of a rejected answer included.", + "format": "int64", + "type": "integer" + }, + "total_tokens": { + "description": "input_tokens plus output_tokens.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "key", + "provider_id", + "provider_name", + "provider_type", + "model", + "requests", + "input_tokens", + "cached_input_tokens", + "output_tokens", + "total_tokens", + "audio_seconds" + ], + "type": "object" + }, + "AdminInsightsAIPoint": { + "additionalProperties": false, + "properties": { + "date": { + "description": "UTC calendar day (YYYY-MM-DD)", + "format": "date", + "type": "string" + }, + "input_tokens": { + "format": "int64", + "type": "integer" + }, + "output_tokens": { + "format": "int64", + "type": "integer" + }, + "tokens_by_feature": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "Input plus output tokens keyed by features[].feature.", + "type": "object" + }, + "tokens_by_model": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "Input plus output tokens keyed by models[].key.", + "type": "object" + } + }, + "required": [ + "date", + "input_tokens", + "output_tokens", + "tokens_by_model", + "tokens_by_feature" + ], + "type": "object" + }, + "AdminInsightsAIUsage": { + "additionalProperties": false, + "properties": { + "audio_seconds": { + "description": "Seconds of audio transcribed; speech models report audio instead of tokens.", + "format": "double", + "type": "number" + }, + "cached_input_tokens": { + "description": "Input tokens the provider served from its prompt cache.", + "format": "int64", + "type": "integer" + }, + "input_tokens": { + "description": "Input tokens, cached input included.", + "format": "int64", + "type": "integer" + }, + "output_tokens": { + "description": "Output tokens, reasoning tokens included.", + "format": "int64", + "type": "integer" + }, + "requests": { + "description": "Provider requests answered, retries of a rejected answer included.", + "format": "int64", + "type": "integer" + }, + "total_tokens": { + "description": "input_tokens plus output_tokens.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "requests", + "input_tokens", + "cached_input_tokens", + "output_tokens", + "total_tokens", + "audio_seconds" + ], + "type": "object" + }, "AdminInsightsActivity": { "additionalProperties": false, "properties": { @@ -13340,6 +13620,10 @@ "AdminInsightsCapabilities": { "additionalProperties": false, "properties": { + "ai_usage": { + "description": "The AI usage read (getAdminInsightsAI) is served", + "type": "boolean" + }, "allowed": { "description": "Whether the current principal may use the capability", "type": "boolean" @@ -13389,6 +13673,7 @@ "profile_filter", "library", "breakdowns", + "ai_usage", "revision", "state", "allowed" @@ -99382,6 +99667,212 @@ "x-silo-service-backed": true } }, + "/api/v2/admin/insights/ai": { + "get": { + "operationId": "getAdminInsightsAI", + "parameters": [ + { + "description": "Optional. When present, it must name the authenticated account's primary profile; an absent header is accepted.", + "in": "header", + "name": "X-Profile-Id", + "schema": { + "examples": [ + "1" + ], + "type": "string" + } + }, + { + "description": "Verification proof for a PIN-locked profile, issued by POST /api/v2/profiles/{id}/verify-pin; required only when the declared profile is locked", + "in": "header", + "name": "X-Profile-Token", + "schema": { + "examples": [ + "pvt_5f3a9c1e7b2d4e8fa0c6" + ], + "type": "string" + } + }, + { + "description": "Preset time window or custom", + "explode": false, + "in": "query", + "name": "range", + "schema": { + "default": "30d", + "description": "Preset time window or custom", + "enum": [ + "7d", + "30d", + "90d", + "1y", + "all", + "custom" + ], + "type": "string" + } + }, + { + "description": "Inclusive local start date (YYYY-MM-DD in tz), required when range=custom", + "explode": false, + "in": "query", + "name": "from_date", + "schema": { + "description": "Inclusive local start date (YYYY-MM-DD in tz), required when range=custom", + "format": "date", + "type": "string" + } + }, + { + "description": "Inclusive local end date (YYYY-MM-DD in tz), required when range=custom", + "explode": false, + "in": "query", + "name": "to_date", + "schema": { + "description": "Inclusive local end date (YYYY-MM-DD in tz), required when range=custom", + "format": "date", + "type": "string" + } + }, + { + "description": "IANA timezone identifier", + "explode": false, + "in": "query", + "name": "tz", + "schema": { + "default": "UTC", + "description": "IANA timezone identifier", + "maxLength": 128, + "type": "string" + } + }, + { + "description": "Accepted for parity with the other Insights reads; AI usage is never cached", + "explode": false, + "in": "query", + "name": "refresh", + "schema": { + "default": false, + "description": "Accepted for parity with the other Insights reads; AI usage is never cached", + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminInsightsAI" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Not Found" + }, + "406": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Not Acceptable" + }, + "422": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Unprocessable Entity" + }, + "429": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Too Many Requests" + }, + "500": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Internal Server Error" + }, + "503": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Service Unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Read AI token and transcribed-audio usage per provider model, Silo feature and UTC day.", + "tags": [ + "admin-observability" + ], + "x-silo-class": "acting_admin", + "x-silo-service-backed": true + } + }, "/api/v2/admin/insights/bandwidth": { "get": { "operationId": "getAdminInsightsBandwidth", diff --git a/docs/admin-api.md b/docs/admin-api.md index f55dfc8565b..034f6df9024 100644 --- a/docs/admin-api.md +++ b/docs/admin-api.md @@ -2401,8 +2401,8 @@ window. The implementation and its edge cases are documented in - `GET /api/v2/admin/insights/capabilities` (`getAdminInsightsCapabilities`) advertises whether Insights and its long-term per-node egress archive are configured (`available`, `node_egress_daily`), the Titles reads (`titles`), the `profile_id` filter - (`profile_filter`), the Library read (`library`), and the breakdown fields listed below - (`breakdowns`). + (`profile_filter`), the Library read (`library`), the breakdown fields listed below + (`breakdowns`), and the AI usage read (`ai_usage`). - `GET /api/v2/admin/insights/activity` (`getAdminInsightsActivity`) accepts optional `library_id`, `user_id` and `profile_id` filters and returns window totals (`plays`, `sessions`, completion and play-method counts over plays), auto-bucketed local-timezone @@ -2462,6 +2462,19 @@ window. The implementation and its edge cases are documented in historical totals or peaks) to report multi-year egress volume, API vs. node totals, peak throughput, per-node daily breakdown, and remote vs. local session share. Activity's `peak_streams` series uses the same UTC-day daily rollup union. +- `GET /api/v2/admin/insights/ai` (`getAdminInsightsAI`) reads `ai_usage_daily`: one row per + UTC day, AI provider, model and feature, which every API replica adds to as provider + requests are answered (`internal/ai/usage`). A request counts once per answered attempt, so + a retried reply Silo could not use counts twice when the provider reported usage for it. + Refusals do not count: a 4xx, or an error object or failed stream event inside a 200 that + reports no usage. Tokens are what the provider reports: `input_tokens` includes + `cached_input_tokens`, `output_tokens` includes reasoning, and a usable reply from a server + that reports none still counts the request. Speech models report `audio_seconds` instead of + tokens; a Gemini embedding response without `usageMetadata` counts zero tokens. + `models[].provider_name` and `provider_type` come from the current provider registry + (`chatgpt` for a connected ChatGPT plan) and are empty once a provider is removed. + `tracking_since` is a UTC date: the earlier of the day the usage table was installed and + the first recorded day; usage before it was not recorded. - `GET /api/v2/admin/insights/library` (`getAdminInsightsLibrary`) accepts optional `library_id`, `user_id` and `profile_id` and reads the catalog against the window's plays. Titles are movies and series; a series is played when any of its episodes has a play. diff --git a/docs/api-keys-api.md b/docs/api-keys-api.md index e34b0b679e7..ee10866cf84 100644 --- a/docs/api-keys-api.md +++ b/docs/api-keys-api.md @@ -258,7 +258,7 @@ answers any owner. | Area | Paths under `/api/v2` | |---|---| | Live sessions | `/admin/sessions`, `/admin/sessions/summary`, `/admin/sessions/capabilities`, `/admin/sessions/command-capabilities`, `/events/capabilities` | -| History and stats | `/admin/playback-history`, `/admin/playback-history/capabilities`, `/admin/playback-history/{session_id}`, `/admin/stats/timeseries`, `/admin/stats/playback-activity`, `/admin/stats/top-activity`, `/admin/stats/downloads`, `/admin/insights/capabilities`, `/admin/insights/activity`, `/admin/insights/people`, `/admin/insights/devices`, `/admin/insights/bandwidth`, `/admin/insights/titles`, `/admin/insights/titles/{content_id}`, `/admin/insights/library` | +| History and stats | `/admin/playback-history`, `/admin/playback-history/capabilities`, `/admin/playback-history/{session_id}`, `/admin/stats/timeseries`, `/admin/stats/playback-activity`, `/admin/stats/top-activity`, `/admin/stats/downloads`, `/admin/insights/capabilities`, `/admin/insights/activity`, `/admin/insights/people`, `/admin/insights/devices`, `/admin/insights/bandwidth`, `/admin/insights/titles`, `/admin/insights/titles/{content_id}`, `/admin/insights/library`, `/admin/insights/ai` | | Accounts | `/admin/users`, `/admin/users/capabilities`, `/admin/users/{id}`, and `/admin/users/{id}/` `profiles`, `devices`, `ips`, `downloads`, `downloads/summary`, `watch-summary` | | Devices and addresses | `/admin/devices`, `/admin/devices/capabilities`, `/admin/ips` | | Downloads | `/admin/downloads/entries`, `/admin/downloads/devices`, `/admin/downloads/storage/capabilities`, `/admin/downloads/preparations`, `/admin/downloads/preparations/capabilities` | diff --git a/internal/ai/chatgpt/selection.go b/internal/ai/chatgpt/selection.go index 91e3cf10913..79d2094ee5a 100644 --- a/internal/ai/chatgpt/selection.go +++ b/internal/ai/chatgpt/selection.go @@ -194,7 +194,7 @@ func (s *Service) textConfig(ctx context.Context, recheckUsage bool) (llm.Config } effective := config.EffectiveAdminSettings(values) baseURL, apiKey := config.ResolveAIEndpoint(effective, config.AITextProviderSettingKey, config.AICapabilityChat) - cfg := llm.Config{AuthMode: effective[authModeSetting], BaseURL: baseURL, APIKey: apiKey, ChatModel: effective[chatModelSetting], ReasoningEffort: effective[reasoningEffortSetting]} + cfg := llm.Config{AuthMode: effective[authModeSetting], ProviderID: strings.TrimSpace(effective[config.AITextProviderSettingKey]), BaseURL: baseURL, APIKey: apiKey, ChatModel: effective[chatModelSetting], ReasoningEffort: effective[reasoningEffortSetting]} cfg.ServiceTier = config.ResolveAIServiceTier(effective) if recheckUsage { cfg.AuthMode = authModeChatGPT diff --git a/internal/ai/llm/api_responses.go b/internal/ai/llm/api_responses.go index 70f6ec56011..4b1815f9cc4 100644 --- a/internal/ai/llm/api_responses.go +++ b/internal/ai/llm/api_responses.go @@ -29,7 +29,7 @@ func (c *Client) apiResponses(ctx context.Context, cfg Config, messages []Messag return "", fmt.Errorf("marshal responses request: %w", err) } var content string - err = c.doWithRetry(ctx, c.chatHTTP, "Responses API", func() (*http.Request, error) { + err = c.doWithRetry(ctx, c.chatHTTP, "Responses API", textMeter(ctx, cfg), func() (*http.Request, error) { r, err := http.NewRequestWithContext(ctx, http.MethodPost, endpointURL(cfg.BaseURL, "responses"), bytes.NewReader(body)) if err != nil { return nil, err diff --git a/internal/ai/llm/client.go b/internal/ai/llm/client.go index 88eb143aa4e..9c750cb98be 100644 --- a/internal/ai/llm/client.go +++ b/internal/ai/llm/client.go @@ -22,6 +22,7 @@ import ( "time" "github.com/Silo-Server/silo-server/internal/ai/reasoning" + "github.com/Silo-Server/silo-server/internal/ai/usage" ) // Config holds the connection settings for the shared OpenAI-compatible @@ -40,9 +41,13 @@ type Config struct { // Production text requests resolve provider settings and the registration // together. Draft checks and transcription retain their supplied config. TextConfigSource func(context.Context) (Config, error) - BaseURL string // e.g. "https://api.openai.com" (no trailing /v1) - APIKey string // empty for keyless local servers - ChatModel string // chat-completions model used for translation + // ProviderID and ASRProviderID name the AI provider registry entries + // chat and transcription use; usage is filed under them. + ProviderID string + ASRProviderID string + BaseURL string // e.g. "https://api.openai.com" (no trailing /v1) + APIKey string // empty for keyless local servers + ChatModel string // chat-completions model used for translation ASRBaseURL string // empty when no speech-to-text provider is chosen ASRAPIKey string // empty for keyless local servers @@ -76,6 +81,7 @@ type Client struct { // (sized to the chunk duration), which a client timeout would silently cap. chatHTTP *http.Client asrHTTP *http.Client + usage usage.Recorder } // NewClient builds a client from the endpoint config. @@ -168,7 +174,7 @@ func (c *Client) Chat(ctx context.Context, messages []Message, jsonObject bool) url := endpointURL(cfg.BaseURL, "chat/completions") var content string - err = c.doWithRetry(ctx, c.chatHTTP, "chat API", + err = c.doWithRetry(ctx, c.chatHTTP, "chat API", textMeter(ctx, cfg), func() (*http.Request, error) { httpReq, reqErr := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(body)) if reqErr != nil { @@ -238,17 +244,20 @@ type HTTPError struct { func (e *HTTPError) Error() string { return e.message } // doWithRetry runs the shared request/retry loop: build constructs a fresh -// request per attempt, parse consumes a 200 body. Transport errors, read +// request per attempt, parse consumes a 200 body, and each 200 attempt is +// filed as usage under m (see record). Transport errors, read // errors, 429 (honoring Retry-After), 5xx, and retryable parse errors back // off and retry; other 4xx and permanentError parse failures return at once. -func (c *Client) doWithRetry(ctx context.Context, httpClient *http.Client, label string, +func (c *Client) doWithRetry(ctx context.Context, httpClient *http.Client, label string, m meter, build func() (*http.Request, error), parse func(body []byte) error) error { return c.doReaderWithRetry(ctx, httpClient, label, build, func(body io.Reader) error { data, err := io.ReadAll(body) if err != nil { return fmt.Errorf("read %s response: %w", label, err) } - return parse(data) + parseErr := parse(data) + c.recordBody(ctx, m, data, parseErr) + return parseErr }) } diff --git a/internal/ai/llm/client_test.go b/internal/ai/llm/client_test.go index 5c80905eefd..07ba05ddff5 100644 --- a/internal/ai/llm/client_test.go +++ b/internal/ai/llm/client_test.go @@ -1,12 +1,16 @@ package llm import ( + "context" "io" "net/http" "strings" + "sync" "testing" "testing/synctest" "time" + + "github.com/Silo-Server/silo-server/internal/ai/usage" ) func chatConfig(baseURL string) Config { @@ -42,3 +46,147 @@ func TestChatRetriesOn429HonoringRetryAfter(t *testing.T) { } const verboseJSON = `{"language":"english","text":"hi there","segments":[{"start":0.0,"end":1.5,"text":" hi"},{"start":1.5,"end":3.0,"text":" there"}]}` + +type recordedUsage struct { + mu sync.Mutex + rows []usage.Usage +} + +func (r *recordedUsage) Record(_ context.Context, u usage.Usage) { + r.mu.Lock() + defer r.mu.Unlock() + r.rows = append(r.rows, u) +} + +func okResponse(body string) *http.Response { + return &http.Response{StatusCode: http.StatusOK, Header: make(http.Header), Body: io.NopCloser(strings.NewReader(body))} +} + +func TestChatRecordsUsagePerAnsweredRequest(t *testing.T) { + const usageBody = `"usage":{"prompt_tokens":120,"completion_tokens":40,"total_tokens":160,"prompt_tokens_details":{"cached_tokens":100},"completion_tokens_details":{"reasoning_tokens":30}}` + for _, test := range []struct { + name string + cfg Config + responses []string + want []usage.Usage + }{ + { + name: "chat completions", + cfg: Config{ProviderID: "openai-1", BaseURL: "https://chat.example.test", ChatModel: "gpt-test"}, + responses: []string{`{"choices":[{"message":{"role":"assistant","content":"hello"}}],` + usageBody + `}`}, + want: []usage.Usage{{ProviderID: "openai-1", Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 120, CachedInputTokens: 100, OutputTokens: 40}}, + }, + { + // The provider bills a reply Silo cannot use, so the retry counts twice. + name: "unusable reply then retry", + cfg: Config{ProviderID: "openai-1", BaseURL: "https://chat.example.test", ChatModel: "gpt-test"}, + responses: []string{ + `{"choices":[],` + usageBody + `}`, + `{"choices":[{"message":{"role":"assistant","content":"hello"}}],` + usageBody + `}`, + }, + want: []usage.Usage{ + {ProviderID: "openai-1", Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 120, CachedInputTokens: 100, OutputTokens: 40}, + {ProviderID: "openai-1", Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 120, CachedInputTokens: 100, OutputTokens: 40}, + }, + }, + { + // A refusal inside a 200 bills nothing, so only the retry counts. + name: "in-response error without usage is not counted", + cfg: Config{ProviderID: "openai-1", BaseURL: "https://chat.example.test", ChatModel: "gpt-test"}, + responses: []string{ + `{"error":{"message":"overloaded"}}`, + `{"choices":[{"message":{"role":"assistant","content":"hello"}}],` + usageBody + `}`, + }, + want: []usage.Usage{{ProviderID: "openai-1", Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 120, CachedInputTokens: 100, OutputTokens: 40}}, + }, + { + name: "server without usage still counts the request", + cfg: Config{ProviderID: "ollama-1", BaseURL: "http://ollama.example.test", ChatModel: "qwen3:14b"}, + responses: []string{`{"choices":[{"message":{"role":"assistant","content":"hello"}}]}`}, + want: []usage.Usage{{ProviderID: "ollama-1", Model: "qwen3:14b", Feature: usage.FeatureSubtitleTranslation}}, + }, + { + name: "responses API", + cfg: Config{ProviderID: "openai-1", BaseURL: "https://chat.example.test", ChatModel: "gpt-test", ServiceTier: serviceTierUltrafast}, + responses: []string{`{"status":"completed","output":[{"type":"message","content":[{"type":"output_text","text":"hello"}]}],` + + `"usage":{"input_tokens":90,"input_tokens_details":{"cached_tokens":10},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":5},"total_tokens":115}}`}, + want: []usage.Usage{{ProviderID: "openai-1", Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 90, CachedInputTokens: 10, OutputTokens: 25}}, + }, + { + name: "ChatGPT plan stream", + cfg: Config{AuthMode: AuthModeChatGPT, ProviderID: "openai-1", ChatModel: "gpt-test", + ChatGPTTokenSource: testTokenSource(func(context.Context) (string, error) { return "token", nil })}, + responses: []string{"data: {\"type\":\"response.output_text.delta\",\"delta\":\"hello\"}\n\n" + + "data: {\"type\":\"response.completed\",\"response\":{\"usage\":{\"input_tokens\":70,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":12}}}\n\n"}, + want: []usage.Usage{{ProviderID: usage.ChatGPTProviderID, Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 70, OutputTokens: 12}}, + }, + { + name: "ChatGPT plan rate limit is not counted", + cfg: Config{AuthMode: AuthModeChatGPT, ProviderID: "openai-1", ChatModel: "gpt-test", + ChatGPTTokenSource: testTokenSource(func(context.Context) (string, error) { return "token", nil })}, + responses: []string{ + "data: {\"type\":\"response.failed\",\"response\":{\"error\":{\"code\":\"rate_limit_exceeded\"}}}\n\n", + "data: {\"type\":\"response.output_text.delta\",\"delta\":\"hello\"}\n\n" + + "data: {\"type\":\"response.completed\",\"response\":{\"usage\":{\"input_tokens\":70,\"output_tokens\":12}}}\n\n", + }, + want: []usage.Usage{{ProviderID: usage.ChatGPTProviderID, Model: "gpt-test", Feature: usage.FeatureSubtitleTranslation, InputTokens: 70, OutputTokens: 12}}, + }, + } { + t.Run(test.name, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + rec := &recordedUsage{} + client := NewClient(test.cfg) + client.SetUsageRecorder(rec) + calls := 0 + client.chatHTTP.Transport = retryRoundTripFunc(func(*http.Request) (*http.Response, error) { + body := test.responses[min(calls, len(test.responses)-1)] + calls++ + return okResponse(body), nil + }) + ctx := usage.WithFeature(t.Context(), usage.FeatureSubtitleTranslation) + if _, err := client.Chat(ctx, []Message{{Role: "user", Content: "hi"}}, false); err != nil { + t.Fatalf("Chat: %v", err) + } + if len(rec.rows) != len(test.want) { + t.Fatalf("recorded %d rows %+v, want %+v", len(rec.rows), rec.rows, test.want) + } + for i := range test.want { + if rec.rows[i] != test.want[i] { + t.Errorf("row %d = %+v, want %+v", i, rec.rows[i], test.want[i]) + } + } + }) + }) + } +} + +func TestTranscribeRecordsAudioDuration(t *testing.T) { + rec := &recordedUsage{} + client := NewClient(Config{ASRProviderID: "groq-1", ASRBaseURL: "https://asr.example.test", ASRModel: "whisper-large-v3-turbo"}) + client.SetUsageRecorder(rec) + client.asrHTTP.Transport = retryRoundTripFunc(func(*http.Request) (*http.Response, error) { + return okResponse(`{"language":"english","duration":600.5,"text":"hi","segments":[{"start":0,"end":1.5,"text":" hi"}]}`), nil + }) + if _, err := client.Transcribe(t.Context(), TranscribeRequest{Filename: "a.wav", Audio: []byte("x")}); err != nil { + t.Fatalf("Transcribe: %v", err) + } + want := usage.Usage{ProviderID: "groq-1", Model: "whisper-large-v3-turbo", Feature: usage.FeatureTranscription, AudioSeconds: 600.5} + if len(rec.rows) != 1 || rec.rows[0] != want { + t.Fatalf("recorded %+v, want [%+v]", rec.rows, want) + } +} + +func TestRejectedRequestsRecordNoUsage(t *testing.T) { + rec := &recordedUsage{} + client := NewClient(Config{ProviderID: "openai-1", BaseURL: "https://chat.example.test", ChatModel: "gpt-test"}) + client.SetUsageRecorder(rec) + client.chatHTTP.Transport = retryRoundTripFunc(func(*http.Request) (*http.Response, error) { + return &http.Response{StatusCode: http.StatusBadRequest, Body: io.NopCloser(strings.NewReader(`{"error":{"message":"bad"}}`))}, nil + }) + if _, err := client.Chat(t.Context(), []Message{{Role: "user", Content: "hi"}}, false); err == nil { + t.Fatal("Chat succeeded on a 400") + } + if len(rec.rows) != 0 { + t.Fatalf("recorded %+v for a rejected request", rec.rows) + } +} diff --git a/internal/ai/llm/responses.go b/internal/ai/llm/responses.go index 8342bfa7c86..3f01f60d533 100644 --- a/internal/ai/llm/responses.go +++ b/internal/ai/llm/responses.go @@ -97,6 +97,7 @@ func (c *Client) chatGPT(ctx context.Context, cfg Config, messages []Message, js return "", err } var content string + m := textMeter(ctx, cfg) httpClient := *c.chatHTTP httpClient.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse } var requestToken string @@ -120,7 +121,9 @@ func (c *Client) chatGPT(ctx context.Context, cfg Config, messages []Message, js return r, nil }, func(data io.Reader) error { var parseErr error - content, parseErr = readResponseStream(data) + var used apiUsage + content, parseErr = readResponseStream(data, &used) + c.record(ctx, m, used, 0, parseErr) return parseErr }) if errors.Is(err, ErrQuotaExhausted) && cfg.ChatGPTUsageLimited != nil { @@ -156,8 +159,9 @@ func (c *Client) chatGPT(ctx context.Context, cfg Config, messages []Message, js } // readResponseStream requires the terminal completion event. Partial text, -// including text preceding a late usage-limit error, is never published. -func readResponseStream(data io.Reader) (string, error) { +// including text preceding a late usage-limit error, is never published. The +// usage a completed or incomplete response event carries goes into used. +func readResponseStream(data io.Reader, used *apiUsage) (string, error) { var text strings.Builder completed := false scanner := bufio.NewScanner(io.LimitReader(data, 32<<20)) @@ -178,6 +182,7 @@ func readResponseStream(data io.Reader) (string, error) { Type string `json:"type"` Delta string `json:"delta"` Response struct { + Usage *apiUsage `json:"usage"` Error *struct { Code string `json:"code"` } `json:"error"` @@ -187,6 +192,9 @@ func readResponseStream(data io.Reader) (string, error) { if err := json.Unmarshal([]byte(raw), &event); err != nil { return fmt.Errorf("invalid ChatGPT response event: %w", err) } + if event.Response.Usage != nil { + *used = *event.Response.Usage + } switch event.Type { case "response.output_text.delta": text.WriteString(event.Delta) diff --git a/internal/ai/llm/responses_test.go b/internal/ai/llm/responses_test.go index 83e0c5c9fa4..f61dbfe3998 100644 --- a/internal/ai/llm/responses_test.go +++ b/internal/ai/llm/responses_test.go @@ -54,7 +54,7 @@ func TestSubscriptionRejectsPartialAndFailedStreams(t *testing.T) { {name: "late failure", tail: "data: {\"type\":\"error\",\"message\":\"provider-secret\"}\n\n"}, } { t.Run(test.name, func(t *testing.T) { - out, err := readResponseStream(strings.NewReader(partial + test.tail)) + out, err := readResponseStream(strings.NewReader(partial+test.tail), &apiUsage{}) if err == nil || out != "" { t.Fatalf("published partial text: %q, %v", out, err) } @@ -102,7 +102,7 @@ func TestSubscriptionStreamFraming(t *testing.T) { if chunked { reader = iotest.OneByteReader(reader) } - out, err := readResponseStream(reader) + out, err := readResponseStream(reader, &apiUsage{}) if err != nil || out != test.want { t.Fatalf("response = %q, %v; want %q", out, err, test.want) } @@ -120,7 +120,7 @@ func TestSubscriptionCompletionDoesNotWaitForStreamEOF(t *testing.T) { defer func() { _ = writer.Close() }() result := make(chan error, 1) go func() { - out, err := readResponseStream(reader) + out, err := readResponseStream(reader, &apiUsage{}) if err == nil && out != "complete" { err = errors.New("incorrect completed output") } diff --git a/internal/ai/llm/retry_error_test.go b/internal/ai/llm/retry_error_test.go index 8e226f5a1e8..ca45c252106 100644 --- a/internal/ai/llm/retry_error_test.go +++ b/internal/ai/llm/retry_error_test.go @@ -59,7 +59,7 @@ func TestRetryCancellationPreservesLastFailure(t *testing.T) { }, nil })} c := NewClient(Config{}) - err := c.doWithRetry(ctx, client, "transcription API", func() (*http.Request, error) { + err := c.doWithRetry(ctx, client, "transcription API", meter{}, func() (*http.Request, error) { return http.NewRequestWithContext(ctx, http.MethodPost, "https://speech.example.test/v1/audio/transcriptions", nil) }, func([]byte) error { return tt.parseErr }) if !errors.Is(err, context.Canceled) || !strings.Contains(err.Error(), tt.want) { diff --git a/internal/ai/llm/transcribe.go b/internal/ai/llm/transcribe.go index f1d678cd785..0161ef85df4 100644 --- a/internal/ai/llm/transcribe.go +++ b/internal/ai/llm/transcribe.go @@ -11,6 +11,8 @@ import ( "net/url" "strings" "time" + + "github.com/Silo-Server/silo-server/internal/ai/usage" ) // defaultTranscribeTimeout bounds a single transcription request when the @@ -145,7 +147,8 @@ func (c *Client) Transcribe(ctx context.Context, req TranscribeRequest) (*Transc url := endpointURL(cfg.ASRBaseURL, "audio/transcriptions") var result *Transcription - doErr := c.doWithRetry(ctx, c.asrHTTP, "transcription API", + m := meter{providerID: cfg.ASRProviderID, model: cfg.ASRModel, feature: usage.FeatureTranscription} + doErr := c.doWithRetry(ctx, c.asrHTTP, "transcription API", m, func() (*http.Request, error) { var buf bytes.Buffer w := multipart.NewWriter(&buf) diff --git a/internal/ai/llm/usage.go b/internal/ai/llm/usage.go new file mode 100644 index 00000000000..38e12c00b89 --- /dev/null +++ b/internal/ai/llm/usage.go @@ -0,0 +1,82 @@ +package llm + +import ( + "context" + "encoding/json" + + "github.com/Silo-Server/silo-server/internal/ai/usage" +) + +// SetUsageRecorder installs the recorder every answered request reports to. +// Call it before the client serves requests; nil records nothing. +func (c *Client) SetUsageRecorder(r usage.Recorder) { + c.usage = r +} + +// apiUsage reads the token counts of both OpenAI wire formats: Chat +// Completions (prompt/completion) and Responses (input/output), which +// transcription models also use. A response carries one set or neither. +type apiUsage struct { + PromptTokens usage.Count `json:"prompt_tokens"` + CompletionTokens usage.Count `json:"completion_tokens"` + PromptDetails struct { + CachedTokens usage.Count `json:"cached_tokens"` + } `json:"prompt_tokens_details"` + InputTokens usage.Count `json:"input_tokens"` + OutputTokens usage.Count `json:"output_tokens"` + InputDetails struct { + CachedTokens usage.Count `json:"cached_tokens"` + } `json:"input_tokens_details"` + // Seconds is the audio length a duration-billed transcription model reports. + Seconds float64 `json:"seconds"` +} + +// meter names where a request's usage is filed. +type meter struct { + providerID string + model string + feature usage.Feature +} + +func textMeter(ctx context.Context, cfg Config) meter { + providerID := cfg.ProviderID + if cfg.AuthMode == AuthModeChatGPT { + providerID = usage.ChatGPTProviderID + } + return meter{providerID: providerID, model: cfg.ChatModel, feature: usage.FeatureFrom(ctx)} +} + +// recordBody files one 200 attempt from its JSON response body. +func (c *Client) recordBody(ctx context.Context, m meter, body []byte, parseErr error) { + if c.usage == nil { + return + } + var envelope struct { + Usage apiUsage `json:"usage"` + Duration float64 `json:"duration"` + } + _ = json.Unmarshal(body, &envelope) + if envelope.Duration == 0 { + envelope.Duration = envelope.Usage.Seconds + } + c.record(ctx, m, envelope.Usage, envelope.Duration, parseErr) +} + +// record files one 200 attempt. It counts when Silo used the reply or the +// provider reported usage for it; a refusal inside a 200 (an error object, a +// failed stream event) bills nothing and is left out, like a 4xx. A usable +// reply without usage, as some local servers send, still counts. +func (c *Client) record(ctx context.Context, m meter, u apiUsage, audioSeconds float64, parseErr error) { + if c.usage == nil || (parseErr != nil && u == (apiUsage{}) && audioSeconds == 0) { + return + } + c.usage.Record(ctx, usage.Usage{ + ProviderID: m.providerID, + Model: m.model, + Feature: m.feature, + InputTokens: int64(u.PromptTokens + u.InputTokens), + CachedInputTokens: int64(u.PromptDetails.CachedTokens + u.InputDetails.CachedTokens), + OutputTokens: int64(u.CompletionTokens + u.OutputTokens), + AudioSeconds: audioSeconds, + }) +} diff --git a/internal/ai/usage/store.go b/internal/ai/usage/store.go new file mode 100644 index 00000000000..05af612f887 --- /dev/null +++ b/internal/ai/usage/store.go @@ -0,0 +1,238 @@ +package usage + +import ( + "cmp" + "context" + "errors" + "fmt" + "log/slog" + "slices" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +// recordTimeout bounds one usage write. A request's own cancellation does not +// stop it: the provider has already answered and billed the request. +const recordTimeout = 5 * time.Second + +// Execer is the write side of a pool or transaction. +type Execer interface { + Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error) +} + +// Querier is the read side of a pool or transaction. +type Querier interface { + Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error) + QueryRow(ctx context.Context, sql string, args ...any) pgx.Row +} + +var _ Recorder = (*Store)(nil) + +// Store adds usage to the daily totals in ai_usage_daily. Every replica adds +// to the same rows, so totals stay correct however many servers run. +type Store struct { + db Execer + logger *slog.Logger + now func() time.Time +} + +// NewStore returns a store writing through db; a nil logger uses slog.Default. +func NewStore(db Execer, logger *slog.Logger) *Store { + if logger == nil { + logger = slog.Default() + } + return &Store{db: db, logger: logger, now: time.Now} +} + +// Record adds u to today's UTC row for its provider, model and feature. +func (s *Store) Record(ctx context.Context, u Usage) { + ctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), recordTimeout) + defer cancel() + if u.Feature == "" { + u.Feature = FeatureOther + } + _, err := s.db.Exec(ctx, ` + INSERT INTO ai_usage_daily AS d (day, provider_id, model, feature, requests, + input_tokens, cached_input_tokens, output_tokens, audio_seconds) + VALUES ($1, $2, $3, $4, 1, $5, $6, $7, $8) + ON CONFLICT (day, provider_id, model, feature) DO UPDATE SET + requests = d.requests + 1, + input_tokens = d.input_tokens + EXCLUDED.input_tokens, + cached_input_tokens = d.cached_input_tokens + EXCLUDED.cached_input_tokens, + output_tokens = d.output_tokens + EXCLUDED.output_tokens, + audio_seconds = d.audio_seconds + EXCLUDED.audio_seconds`, + s.now().UTC().Format(time.DateOnly), u.ProviderID, u.Model, string(u.Feature), + max(u.InputTokens, 0), max(u.CachedInputTokens, 0), max(u.OutputTokens, 0), max(u.AudioSeconds, 0)) + if err != nil { + s.logger.WarnContext(ctx, "recording AI usage failed", "component", "ai", "provider", u.ProviderID, "model", u.Model, "error", err) + } +} + +// trackingMigration is the migration that created ai_usage_daily: usage is +// recorded from the day it was applied. +const trackingMigration = 20261203132749 + +// TrackingSince returns the first UTC day usage was recorded: the day the +// server started counting, or an earlier day a restored backup holds. Nil +// only when neither is known. goose_db_version.tstamp is a timestamp without +// time zone written by now() in the session's TimeZone, so it is read back in +// that zone before taking its UTC day. +func TrackingSince(ctx context.Context, db Querier) (*time.Time, error) { + var day *time.Time + if err := db.QueryRow(ctx, ` + SELECT least( + (SELECT min(day) FROM ai_usage_daily), + (SELECT min((tstamp::timestamptz AT TIME ZONE 'UTC')::date) FROM public.goose_db_version WHERE version_id = $1 AND is_applied))`, + trackingMigration).Scan(&day); err != nil { + return nil, fmt.Errorf("reading first AI usage day: %w", err) + } + return day, nil +} + +// Totals is usage summed over some set of requests. +type Totals struct { + Requests int64 + InputTokens int64 + CachedInputTokens int64 + OutputTokens int64 + AudioSeconds float64 +} + +func addTotals(t *Totals, o Totals) { + t.Requests += o.Requests + t.InputTokens += o.InputTokens + t.CachedInputTokens += o.CachedInputTokens + t.OutputTokens += o.OutputTokens + t.AudioSeconds += o.AudioSeconds +} + +// Tokens is input plus output; cached input is part of input. +func (t Totals) Tokens() int64 { return t.InputTokens + t.OutputTokens } + +// ModelUsage is one provider's model over the report window. +type ModelUsage struct { + ProviderID string + Model string + Totals +} + +// FeatureUsage is one feature over the report window. +type FeatureUsage struct { + Feature Feature + // Models lists the models that served the feature, most tokens first. + Models []string + Totals +} + +// DayUsage is one UTC day's tokens. +type DayUsage struct { + Date string + InputTokens int64 + OutputTokens int64 + TokensByModel map[string]int64 + TokensByFeature map[Feature]int64 +} + +// Report is usage between two UTC days, inclusive. Models and features are +// ordered by tokens, then audio, then name; points by date, days without +// usage omitted. +type Report struct { + Summary Totals + Models []ModelUsage + Features []FeatureUsage + Points []DayUsage +} + +// ModelKey identifies a provider's model in DayUsage.TokensByModel. +func ModelKey(providerID, model string) string { return providerID + "/" + model } + +// Read summarizes usage from fromDay through toDay (YYYY-MM-DD, UTC). +func Read(ctx context.Context, db Querier, fromDay, toDay string) (Report, error) { + rows, err := db.Query(ctx, ` + SELECT day, provider_id, model, feature, requests, input_tokens, + cached_input_tokens, output_tokens, audio_seconds + FROM ai_usage_daily + WHERE day BETWEEN $1::date AND $2::date + ORDER BY day`, fromDay, toDay) + if err != nil { + return Report{}, fmt.Errorf("reading AI usage: %w", err) + } + defer rows.Close() + + var report Report + models := map[string]*ModelUsage{} + type featureAcc struct { + FeatureUsage + modelTokens map[string]int64 + } + features := map[Feature]*featureAcc{} + for rows.Next() { + var ( + day time.Time + providerID, model, feature string + t Totals + ) + if err := rows.Scan(&day, &providerID, &model, &feature, &t.Requests, &t.InputTokens, + &t.CachedInputTokens, &t.OutputTokens, &t.AudioSeconds); err != nil { + return Report{}, fmt.Errorf("scanning AI usage: %w", err) + } + f := Feature(feature) + key := ModelKey(providerID, model) + addTotals(&report.Summary, t) + + m := models[key] + if m == nil { + m = &ModelUsage{ProviderID: providerID, Model: model} + models[key] = m + } + addTotals(&m.Totals, t) + + fu := features[f] + if fu == nil { + fu = &featureAcc{FeatureUsage: FeatureUsage{Feature: f}, modelTokens: map[string]int64{}} + features[f] = fu + } + addTotals(&fu.Totals, t) + fu.modelTokens[model] += t.Tokens() + + date := day.Format(time.DateOnly) + if n := len(report.Points); n == 0 || report.Points[n-1].Date != date { + report.Points = append(report.Points, DayUsage{Date: date, TokensByModel: map[string]int64{}, TokensByFeature: map[Feature]int64{}}) + } + p := &report.Points[len(report.Points)-1] + p.InputTokens += t.InputTokens + p.OutputTokens += t.OutputTokens + p.TokensByModel[key] += t.Tokens() + p.TokensByFeature[f] += t.Tokens() + } + if err := rows.Err(); err != nil { + return Report{}, errors.Join(errors.New("reading AI usage"), err) + } + + for _, m := range models { + report.Models = append(report.Models, *m) + } + slices.SortFunc(report.Models, func(a, b ModelUsage) int { + return cmp.Or(byUsage(a.Totals, b.Totals), cmp.Compare(a.Model, b.Model), cmp.Compare(a.ProviderID, b.ProviderID)) + }) + for _, fu := range features { + for model := range fu.modelTokens { + fu.Models = append(fu.Models, model) + } + slices.SortFunc(fu.Models, func(a, b string) int { + return cmp.Or(cmp.Compare(fu.modelTokens[b], fu.modelTokens[a]), cmp.Compare(a, b)) + }) + report.Features = append(report.Features, fu.FeatureUsage) + } + slices.SortFunc(report.Features, func(a, b FeatureUsage) int { + return cmp.Or(byUsage(a.Totals, b.Totals), cmp.Compare(a.Feature, b.Feature)) + }) + return report, nil +} + +// byUsage orders most tokens first, then most audio. +func byUsage(a, b Totals) int { + return cmp.Or(cmp.Compare(b.Tokens(), a.Tokens()), cmp.Compare(b.AudioSeconds, a.AudioSeconds)) +} diff --git a/internal/ai/usage/store_db_test.go b/internal/ai/usage/store_db_test.go new file mode 100644 index 00000000000..0370b669020 --- /dev/null +++ b/internal/ai/usage/store_db_test.go @@ -0,0 +1,138 @@ +package usage + +import ( + "context" + "fmt" + "os" + "reflect" + "sync" + "testing" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgxpool" +) + +func usageTestPool(t *testing.T) *pgxpool.Pool { + t.Helper() + dsn := os.Getenv("SILO_TEST_DATABASE_URL") + if dsn == "" { + t.Skip("SILO_TEST_DATABASE_URL is not set") + } + admin, err := pgxpool.New(t.Context(), dsn) + if err != nil { + t.Fatal(err) + } + t.Cleanup(admin.Close) + schema := pgx.Identifier{fmt.Sprintf("ai_usage_%d", time.Now().UnixNano())}.Sanitize() + if _, err := admin.Exec(t.Context(), "CREATE SCHEMA "+schema); err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + _, _ = admin.Exec(ctx, "DROP SCHEMA "+schema+" CASCADE") + }) + if _, err := admin.Exec(t.Context(), "CREATE TABLE "+schema+".ai_usage_daily (LIKE public.ai_usage_daily INCLUDING ALL)"); err != nil { + t.Fatal(err) + } + cfg, err := pgxpool.ParseConfig(dsn) + if err != nil { + t.Fatal(err) + } + cfg.ConnConfig.RuntimeParams["search_path"] = schema + pool, err := pgxpool.NewWithConfig(t.Context(), cfg) + if err != nil { + t.Fatal(err) + } + t.Cleanup(pool.Close) + return pool +} + +func TestUsageStoreSumsRequestsIntoDailyReportDB(t *testing.T) { + pool := usageTestPool(t) + ctx := t.Context() + day1 := time.Date(2026, 11, 30, 23, 59, 0, 0, time.UTC) + day2 := time.Date(2026, 12, 1, 0, 1, 0, 0, time.UTC) + chat := Usage{ProviderID: "openai-1", Model: "gpt-test", Feature: FeatureSubtitleTranslation, InputTokens: 100, CachedInputTokens: 40, OutputTokens: 30} + meta := Usage{ProviderID: "openai-1", Model: "gpt-test", Feature: FeatureMetadataTranslation, InputTokens: 10, OutputTokens: 5} + asr := Usage{ProviderID: "groq-1", Model: "whisper", Feature: FeatureTranscription, AudioSeconds: 90.5} + + // Two stores stand in for two API replicas writing the same rows at once. + replicas := []*Store{NewStore(pool, nil), NewStore(pool, nil)} + for _, s := range replicas { + s.now = func() time.Time { return day1 } + } + var wg sync.WaitGroup + for i := range 20 { + wg.Go(func() { replicas[i%2].Record(ctx, chat) }) + } + wg.Wait() + replicas[0].now = func() time.Time { return day2 } + replicas[0].Record(ctx, chat) + replicas[0].Record(ctx, meta) + replicas[0].Record(ctx, asr) + + since, err := TrackingSince(ctx, pool) + if err != nil || since == nil || since.Format(time.DateOnly) != "2026-11-30" { + t.Fatalf("TrackingSince = %v, %v; want 2026-11-30", since, err) + } + + // The migration's apply time is stored in the server's own timezone: + // 08:00 on Jan 1 in Tokyo is still Dec 31 in UTC. + tx, err := pool.Begin(ctx) + if err != nil { + t.Fatal(err) + } + defer func() { _ = tx.Rollback(context.WithoutCancel(ctx)) }() + if _, err := tx.Exec(ctx, `SET LOCAL TimeZone = 'Asia/Tokyo'`); err != nil { + t.Fatal(err) + } + if _, err := tx.Exec(ctx, `INSERT INTO public.goose_db_version (version_id, is_applied, tstamp) VALUES ($1, true, '2020-01-01 08:00')`, trackingMigration); err != nil { + t.Fatal(err) + } + since, err = TrackingSince(ctx, tx) + if err != nil || since == nil || since.Format(time.DateOnly) != "2019-12-31" { + t.Fatalf("TrackingSince in Tokyo = %v, %v; want 2019-12-31", since, err) + } + if err := tx.Rollback(ctx); err != nil { + t.Fatal(err) + } + + report, err := Read(ctx, pool, "2026-12-01", "2026-12-01") + if err != nil { + t.Fatal(err) + } + wantDay := Totals{Requests: 3, InputTokens: 110, CachedInputTokens: 40, OutputTokens: 35, AudioSeconds: 90.5} + if report.Summary != wantDay { + t.Errorf("one-day summary = %+v, want %+v", report.Summary, wantDay) + } + + report, err = Read(ctx, pool, "2026-11-01", "2026-12-31") + if err != nil { + t.Fatal(err) + } + gpt, whisper := ModelKey("openai-1", "gpt-test"), ModelKey("groq-1", "whisper") + want := Report{ + Summary: Totals{Requests: 23, InputTokens: 2110, CachedInputTokens: 840, OutputTokens: 635, AudioSeconds: 90.5}, + Models: []ModelUsage{ + {ProviderID: "openai-1", Model: "gpt-test", Totals: Totals{Requests: 22, InputTokens: 2110, CachedInputTokens: 840, OutputTokens: 635}}, + {ProviderID: "groq-1", Model: "whisper", Totals: Totals{Requests: 1, AudioSeconds: 90.5}}, + }, + Features: []FeatureUsage{ + {Feature: FeatureSubtitleTranslation, Models: []string{"gpt-test"}, Totals: Totals{Requests: 21, InputTokens: 2100, CachedInputTokens: 840, OutputTokens: 630}}, + {Feature: FeatureMetadataTranslation, Models: []string{"gpt-test"}, Totals: Totals{Requests: 1, InputTokens: 10, OutputTokens: 5}}, + {Feature: FeatureTranscription, Models: []string{"whisper"}, Totals: Totals{Requests: 1, AudioSeconds: 90.5}}, + }, + Points: []DayUsage{ + {Date: "2026-11-30", InputTokens: 2000, OutputTokens: 600, + TokensByModel: map[string]int64{gpt: 2600}, TokensByFeature: map[Feature]int64{FeatureSubtitleTranslation: 2600}}, + {Date: "2026-12-01", InputTokens: 110, OutputTokens: 35, + TokensByModel: map[string]int64{gpt: 145, whisper: 0}, + TokensByFeature: map[Feature]int64{FeatureSubtitleTranslation: 130, FeatureMetadataTranslation: 15, FeatureTranscription: 0}}, + }, + } + if !reflect.DeepEqual(report, want) { + t.Errorf("full report =\n%+v\nwant\n%+v", report, want) + } +} diff --git a/internal/ai/usage/usage.go b/internal/ai/usage/usage.go new file mode 100644 index 00000000000..40f6f13bb61 --- /dev/null +++ b/internal/ai/usage/usage.go @@ -0,0 +1,79 @@ +// Package usage counts the tokens and audio Silo's AI features consume, so +// administrators can see what each provider, model and feature uses. +// Requests are counted as they are answered, retries included: a provider +// bills an answer Silo rejects (malformed JSON, an empty reply) like any other. +package usage + +import ( + "context" + "encoding/json" + "math" +) + +// Feature names the Silo feature that made an AI request. +type Feature string + +const ( + FeatureSubtitleTranslation Feature = "subtitle_translation" + FeatureMetadataTranslation Feature = "metadata_translation" + FeatureTranscription Feature = "transcription" + FeatureEmbeddings Feature = "embeddings" + // FeatureOther is a request whose caller named no feature. + FeatureOther Feature = "other" +) + +// ChatGPTProviderID stands in for the provider of requests a connected +// ChatGPT plan answers; the plan is not an entry in the provider registry. +const ChatGPTProviderID = "chatgpt" + +// Usage is what one answered provider request consumed. +type Usage struct { + // ProviderID is the AI provider registry entry the request went to. + ProviderID string + Model string + Feature Feature + // InputTokens includes CachedInputTokens; OutputTokens includes any + // reasoning tokens, as providers report them. + InputTokens int64 + CachedInputTokens int64 + OutputTokens int64 + // AudioSeconds is the transcribed audio length; speech models report + // it instead of tokens. + AudioSeconds float64 +} + +// Count is a token count read from a provider reply. It reads leniently: a +// fractional count is truncated, and a value that isn't a number reads as +// zero, so an odd usage field never fails the reply it rides on. +type Count int64 + +// UnmarshalJSON implements json.Unmarshaler and never fails. +func (c *Count) UnmarshalJSON(b []byte) error { + *c = 0 + var f float64 + if err := json.Unmarshal(b, &f); err == nil && f >= 0 && f < math.MaxInt64 { + *c = Count(f) + } + return nil +} + +// Recorder stores usage. Recording is best effort: a failure is the +// recorder's to log and never fails the request that consumed it. +type Recorder interface { + Record(ctx context.Context, u Usage) +} + +type featureKey struct{} + +// WithFeature tags the AI requests made with ctx as coming from feature. +func WithFeature(ctx context.Context, feature Feature) context.Context { + return context.WithValue(ctx, featureKey{}, feature) +} + +// FeatureFrom returns the feature ctx was tagged with, or FeatureOther. +func FeatureFrom(ctx context.Context) Feature { + if f, ok := ctx.Value(featureKey{}).(Feature); ok && f != "" { + return f + } + return FeatureOther +} diff --git a/internal/ai/usage/usage_test.go b/internal/ai/usage/usage_test.go new file mode 100644 index 00000000000..4b4a0c33264 --- /dev/null +++ b/internal/ai/usage/usage_test.go @@ -0,0 +1,37 @@ +package usage + +import ( + "encoding/json" + "testing" +) + +func TestCountReadsLeniently(t *testing.T) { + for _, test := range []struct { + raw string + want Count + }{ + {`42`, 42}, + {`3.0`, 3}, + {`12.7`, 12}, + {`0.9`, 0}, + {`"12"`, 0}, + {`"abc"`, 0}, + {`{}`, 0}, + {`[1]`, 0}, + {`true`, 0}, + {`null`, 0}, + {`-5`, 0}, + {`1e30`, 0}, + } { + var got struct { + N Count `json:"n"` + } + got.N = 99 + if err := json.Unmarshal([]byte(`{"n":`+test.raw+`}`), &got); err != nil { + t.Fatalf("%s: unmarshal failed: %v", test.raw, err) + } + if got.N != test.want { + t.Errorf("%s: got %d, want %d", test.raw, got.N, test.want) + } + } +} diff --git a/internal/api/handlers/admin_insights_ai.go b/internal/api/handlers/admin_insights_ai.go new file mode 100644 index 00000000000..979e6d0455a --- /dev/null +++ b/internal/api/handlers/admin_insights_ai.go @@ -0,0 +1,111 @@ +package handlers + +import ( + "context" + "fmt" + "time" + + "github.com/Silo-Server/silo-server/internal/ai/usage" + "github.com/Silo-Server/silo-server/internal/config" +) + +// AdminInsightsAIQuery holds the time-range parameters for AI usage. Usage is +// kept per UTC day, so the timezone only places the window's calendar days. +type AdminInsightsAIQuery struct { + Range string + FromDate string + ToDate string + TZ string +} + +// AdminInsightsAIProvider names a provider usage was filed under. +type AdminInsightsAIProvider struct { + Name string + Type string +} + +// AdminInsightsAI is AI usage over an Insights window. +type AdminInsightsAI struct { + // From is the start of the first UTC day read; To is now, or the end + // (exclusive) of the last day of a custom window. + From time.Time + To time.Time + // TrackingSince is the first UTC day usage was counted; nil when unknown. + TrackingSince *time.Time + Report usage.Report + // Providers names the provider IDs in Report.Models that the provider + // registry still holds, plus a connected ChatGPT plan. + Providers map[string]AdminInsightsAIProvider +} + +// ReadAdminInsightsAI reads token and audio usage per model, feature and day. +// The table holds one small row per day, provider, model and feature, so the +// read is not cached. +func (h *AdminHandler) ReadAdminInsightsAI(ctx context.Context, q AdminInsightsAIQuery) (*AdminInsightsAI, error) { + if h.pool == nil { + return nil, ErrAdminDashboardUnavailable + } + // Read the provider names first: the report's transaction holds a pool + // connection, and the settings read takes another. + providers, err := h.aiUsageProviders(ctx) + if err != nil { + return nil, err + } + ctx, tx, done, err := beginAdminHistoryRead(ctx, h.pool, "") + if err != nil { + return nil, fmt.Errorf("beginning insights AI read: %w", err) + } + defer done() + + var dbNow time.Time + if err := tx.QueryRow(ctx, `SELECT now()`).Scan(&dbNow); err != nil { + return nil, fmt.Errorf("reading database time: %w", err) + } + win, err := resolveInsightsWindow(dbNow, q.Range, q.FromDate, q.ToDate, q.TZ) + if err != nil { + return nil, err + } + since, err := usage.TrackingSince(ctx, tx) + if err != nil { + return nil, err + } + fromDay, toDay, upper := metricDaySpanForWindow(win, dbNow) + if win.AllTime { + // All time starts on the first tracked UTC day, whatever the timezone. + fromDay = dbNow.UTC().AddDate(0, 0, -29).Format(time.DateOnly) + if since != nil { + fromDay = since.Format(time.DateOnly) + } + } + report, err := usage.Read(ctx, tx, fromDay, toDay) + if err != nil { + return nil, err + } + // Usage is kept per UTC day, so the window starts at the first UTC day read. + from, err := time.Parse(time.DateOnly, fromDay) + if err != nil { + return nil, fmt.Errorf("parsing AI usage window start: %w", err) + } + return &AdminInsightsAI{From: from, To: upper, TrackingSince: since, Report: report, Providers: providers}, nil +} + +func (h *AdminHandler) aiUsageProviders(ctx context.Context) (map[string]AdminInsightsAIProvider, error) { + out := map[string]AdminInsightsAIProvider{ + usage.ChatGPTProviderID: {Name: "ChatGPT", Type: usage.ChatGPTProviderID}, + } + if h.SettingsRepo == nil { + return out, nil + } + raw, err := h.SettingsRepo.Get(ctx, config.AIProvidersSettingKey) + if err != nil { + return nil, fmt.Errorf("reading AI providers: %w", err) + } + registry, err := config.ParseAIProviderRegistry(raw) + if err != nil { + return nil, fmt.Errorf("reading AI providers: %w", err) + } + for _, p := range registry.Providers { + out[p.ID] = AdminInsightsAIProvider{Name: p.Name, Type: string(p.Type)} + } + return out, nil +} diff --git a/internal/api/handlers/admin_insights_db_test.go b/internal/api/handlers/admin_insights_db_test.go index 4dc1f9b2da7..b2a8e1e7608 100644 --- a/internal/api/handlers/admin_insights_db_test.go +++ b/internal/api/handlers/admin_insights_db_test.go @@ -40,7 +40,7 @@ func insightsTestPool(t *testing.T) *pgxpool.Pool { "users", "media_folders", "media_items", "episodes", "media_item_libraries", "media_files", "stream_nodes", "admin_playback_history", "playback_sessions_sync", "dashboard_metric_samples", "dashboard_node_egress_samples", - "dashboard_metric_daily", "dashboard_node_egress_daily", + "dashboard_metric_daily", "dashboard_node_egress_daily", "ai_usage_daily", } for _, tbl := range tables { if _, err := admin.Exec(t.Context(), fmt.Sprintf("CREATE TABLE %s.%s (LIKE public.%s INCLUDING ALL)", schema, tbl, tbl)); err != nil { @@ -191,6 +191,7 @@ func TestAdminInsightsQueriesAndHistoryFiltersDB(t *testing.T) { t.Run("people", func(t *testing.T) { assertInsightsPeopleDB(t, h) }) t.Run("devices", func(t *testing.T) { assertInsightsDevicesDB(t, h) }) t.Run("bandwidth", func(t *testing.T) { assertInsightsBandwidthDB(t, h) }) + t.Run("ai_usage_window", func(t *testing.T) { assertInsightsAIWindowDB(t, pool, h) }) t.Run("history_filters_and_detail", func(t *testing.T) { assertInsightsHistoryFiltersAndDetailDB(t, h, seed) }) t.Run("edge_cases", func(t *testing.T) { assertInsightsEdgeCasesDB(t, pool, h) }) } @@ -265,6 +266,36 @@ func assertInsightsBandwidthDB(t *testing.T, h *AdminHandler) { } } +// assertInsightsAIWindowDB checks that all time reaches back to the first +// counted UTC day in any timezone, and a preset stops at its own start. +func assertInsightsAIWindowDB(t *testing.T, pool *pgxpool.Pool, h *AdminHandler) { + t.Helper() + if _, err := pool.Exec(t.Context(), ` + INSERT INTO ai_usage_daily (day, provider_id, model, feature, requests, input_tokens, output_tokens) + VALUES ((now() AT TIME ZONE 'UTC')::date - 60, 'p', 'm', 'other', 1, 10, 5), + ((now() AT TIME ZONE 'UTC')::date, 'p', 'm', 'other', 1, 20, 5)`); err != nil { + t.Fatal(err) + } + var first time.Time + if err := pool.QueryRow(t.Context(), `SELECT min(day) FROM ai_usage_daily`).Scan(&first); err != nil { + t.Fatal(err) + } + all, err := h.ReadAdminInsightsAI(t.Context(), AdminInsightsAIQuery{Range: "all", TZ: "Asia/Tokyo"}) + if err != nil { + t.Fatal(err) + } + if !all.From.Equal(first) || all.Report.Summary.Requests != 2 || all.TrackingSince == nil || !all.TrackingSince.Equal(first) { + t.Fatalf("all time: from=%s since=%v summary=%+v; want from and since %s with 2 requests", all.From, all.TrackingSince, all.Report.Summary, first) + } + month, err := h.ReadAdminInsightsAI(t.Context(), AdminInsightsAIQuery{Range: "30d", TZ: "UTC"}) + if err != nil { + t.Fatal(err) + } + if month.Report.Summary.Requests != 1 || !month.From.Equal(first.AddDate(0, 0, 31)) { + t.Fatalf("30d: from=%s summary=%+v; want from %s with 1 request", month.From, month.Report.Summary, first.AddDate(0, 0, 31)) + } +} + func assertInsightsHistoryFiltersAndDetailDB(t *testing.T, h *AdminHandler, seed insightsTestSeed) { t.Helper() ctx := t.Context() diff --git a/internal/api/middleware/api_key_scopes.go b/internal/api/middleware/api_key_scopes.go index 5938bca2b3c..f0f07992077 100644 --- a/internal/api/middleware/api_key_scopes.go +++ b/internal/api/middleware/api_key_scopes.go @@ -135,7 +135,7 @@ var apiKeyScopeRoutes = map[string][]scopeRoute{ {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/playback-history$`)}, {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/playback-history/capabilities$`)}, {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/playback-history/[^/]+$`)}, - {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/insights/(capabilities|activity|people|devices|bandwidth|titles|library)$`)}, + {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/insights/(capabilities|activity|people|devices|bandwidth|titles|library|ai)$`)}, {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/insights/titles/[^/]+$`)}, {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/stats/(timeseries|playback-activity|top-activity|downloads)$`)}, {http.MethodGet, regexp.MustCompile(`^/api/v2/admin/users$`)}, diff --git a/internal/api/router.go b/internal/api/router.go index cf7c0a4f0d6..f3558374753 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -25,6 +25,7 @@ import ( "github.com/Silo-Server/silo-server/internal/ai/chatgpt" "github.com/Silo-Server/silo-server/internal/ai/jobrunner" "github.com/Silo-Server/silo-server/internal/ai/llm" + "github.com/Silo-Server/silo-server/internal/ai/usage" "github.com/Silo-Server/silo-server/internal/animeids" "github.com/Silo-Server/silo-server/internal/api/handlers" apimw "github.com/Silo-Server/silo-server/internal/api/middleware" @@ -2182,6 +2183,9 @@ func newChiRouter(deps Dependencies) chi.Router { var aiSem chan struct{} if deps.Config != nil { aiClient = llm.NewClient(aiConfig(deps.Config)) + if deps.DB != nil { + aiClient.SetUsageRecorder(usage.NewStore(deps.DB, slog.Default())) + } aiSem = jobrunner.NewSemaphore(deps.Config.AI.MaxConcurrentJobs) if deps.OnConfigChange != nil { clientForReload := aiClient @@ -4073,6 +4077,8 @@ func llmConfigFromServer(cfg *config.Config) llm.Config { AuthMode: cfg.AI.AuthMode, ReasoningEffort: cfg.AI.ReasoningEffort, ServiceTier: cfg.AI.ServiceTier, + ProviderID: cfg.AI.TextProviderID, + ASRProviderID: cfg.AI.SpeechProviderID, BaseURL: cfg.AI.BaseURL, APIKey: cfg.AI.APIKey, ChatModel: cfg.AI.ChatModel, diff --git a/internal/api/testdata/media_routes.txt b/internal/api/testdata/media_routes.txt index 296abbca1f9..ba1180b9e0a 100644 --- a/internal/api/testdata/media_routes.txt +++ b/internal/api/testdata/media_routes.txt @@ -252,6 +252,7 @@ DELETE /api/v2/admin/history-imports/sources/{id}/token non-media PUT /api/v2/admin/history-imports/sources/{id}/token non-media GET /api/v2/admin/history-imports/sources/{id}/users non-media GET /api/v2/admin/insights/activity non-media +GET /api/v2/admin/insights/ai non-media GET /api/v2/admin/insights/bandwidth non-media GET /api/v2/admin/insights/capabilities non-media GET /api/v2/admin/insights/devices non-media @@ -1387,6 +1388,7 @@ DELETE /api/v2/admin/history-imports/sources/{id}/token non-media PUT /api/v2/admin/history-imports/sources/{id}/token non-media GET /api/v2/admin/history-imports/sources/{id}/users non-media GET /api/v2/admin/insights/activity non-media +GET /api/v2/admin/insights/ai non-media GET /api/v2/admin/insights/bandwidth non-media GET /api/v2/admin/insights/capabilities non-media GET /api/v2/admin/insights/devices non-media diff --git a/internal/apiv2/admin_insights.go b/internal/apiv2/admin_insights.go index e1c7873a00f..b52a7846522 100644 --- a/internal/apiv2/admin_insights.go +++ b/internal/apiv2/admin_insights.go @@ -19,6 +19,7 @@ type AdminInsightsService interface { ReadAdminInsightsTitles(context.Context, handlers.AdminInsightsTitlesQuery, bool) (*handlers.AdminInsightsTitles, error) ReadAdminInsightsTitle(context.Context, handlers.AdminInsightsTitleQuery) (*handlers.AdminInsightsTitle, error) ReadAdminInsightsLibrary(context.Context, handlers.AdminInsightsWindowQuery, bool) (*handlers.AdminInsightsLibrary, error) + ReadAdminInsightsAI(context.Context, handlers.AdminInsightsAIQuery) (*handlers.AdminInsightsAI, error) } // AdminInsightsCapabilities reports whether Monitor -> Insights and its @@ -31,6 +32,7 @@ type AdminInsightsCapabilities struct { ProfileFilter bool `json:"profile_filter" doc:"Activity, Devices, Titles and title detail accept profile_id together with user_id"` Library bool `json:"library" doc:"The Library read (getAdminInsightsLibrary) is served"` Breakdowns bool `json:"breakdowns" doc:"Activity carries per-bucket active accounts and profiles and end_reasons; Titles carries least_finished; Devices carries client_versions, protocol_buckets, subtitles and audio; People carries top_profiles"` + AIUsage bool `json:"ai_usage" doc:"The AI usage read (getAdminInsightsAI) is served"` } type AdminInsightsCapabilitiesOutput struct { @@ -552,6 +554,7 @@ func registerAdminInsights(reg *Registry) { registerAdminInsightsTitles(reg) registerAdminInsightsTitle(reg) registerAdminInsightsLibrary(reg) + registerAdminInsightsAI(reg) } // insightsWindowQueryOf validates the shared row filters of a v2 Insights read. @@ -588,6 +591,7 @@ func registerAdminInsightsCapabilities(reg *Registry) { out.Body.ProfileFilter = available out.Body.Library = available out.Body.Breakdowns = available + out.Body.AIUsage = available return out, nil }) } diff --git a/internal/apiv2/admin_insights_ai.go b/internal/apiv2/admin_insights_ai.go new file mode 100644 index 00000000000..beb3d624b1b --- /dev/null +++ b/internal/apiv2/admin_insights_ai.go @@ -0,0 +1,127 @@ +package apiv2 + +import ( + "context" + "time" + + "github.com/Silo-Server/silo-server/internal/ai/usage" + "github.com/Silo-Server/silo-server/internal/api/handlers" +) + +type AdminInsightsAIInput struct { + Range string `query:"range" enum:"7d,30d,90d,1y,all,custom" default:"30d" doc:"Preset time window or custom"` + FromDate string `query:"from_date" format:"date" doc:"Inclusive local start date (YYYY-MM-DD in tz), required when range=custom"` + ToDate string `query:"to_date" format:"date" doc:"Inclusive local end date (YYYY-MM-DD in tz), required when range=custom"` + TZ string `query:"tz" maxLength:"128" default:"UTC" doc:"IANA timezone identifier"` + Refresh bool `query:"refresh" default:"false" doc:"Accepted for parity with the other Insights reads; AI usage is never cached"` +} + +// AdminInsightsAIUsage is usage summed over a set of answered provider requests. +type AdminInsightsAIUsage struct { + Requests int64 `json:"requests" doc:"Provider requests answered, retries of a rejected answer included."` + InputTokens int64 `json:"input_tokens" doc:"Input tokens, cached input included."` + CachedInputTokens int64 `json:"cached_input_tokens" doc:"Input tokens the provider served from its prompt cache."` + OutputTokens int64 `json:"output_tokens" doc:"Output tokens, reasoning tokens included."` + TotalTokens int64 `json:"total_tokens" doc:"input_tokens plus output_tokens."` + AudioSeconds float64 `json:"audio_seconds" doc:"Seconds of audio transcribed; speech models report audio instead of tokens."` +} + +type AdminInsightsAIModel struct { + AdminInsightsAIUsage + Key string `json:"key" doc:"Identifies the provider's model in points[].tokens_by_model."` + ProviderID string `json:"provider_id" doc:"AI provider the requests went to; \"chatgpt\" for a connected ChatGPT plan."` + ProviderName string `json:"provider_name" doc:"The provider's current name; empty once the provider is removed."` + ProviderType string `json:"provider_type" doc:"The provider's type, such as openai or ollama; empty once the provider is removed."` + Model string `json:"model"` +} + +type AdminInsightsAIFeature struct { + AdminInsightsAIUsage + Feature string `json:"feature" enum:"subtitle_translation,metadata_translation,transcription,embeddings,other" doc:"The Silo feature that made the requests."` + Models []string `json:"models" doc:"Models that served the feature, most tokens first."` +} + +type AdminInsightsAIPoint struct { + Date string `json:"date" format:"date" doc:"UTC calendar day (YYYY-MM-DD)"` + InputTokens int64 `json:"input_tokens"` + OutputTokens int64 `json:"output_tokens"` + TokensByModel map[string]int64 `json:"tokens_by_model" doc:"Input plus output tokens keyed by models[].key."` + TokensByFeature map[string]int64 `json:"tokens_by_feature" doc:"Input plus output tokens keyed by features[].feature."` +} + +type AdminInsightsAI struct { + From Instant `json:"from" doc:"Start of the first UTC day read; usage is kept per UTC day, so a window in another timezone reads the UTC days it covers by date."` + To Instant `json:"to" doc:"End of the window: now, or for range=custom the exclusive end of the last UTC day read."` + TrackingSince *string `json:"tracking_since" nullable:"true" format:"date" doc:"First UTC day (YYYY-MM-DD) Silo counted AI usage, or null when unknown. Earlier requests were not recorded."` + Summary AdminInsightsAIUsage `json:"summary" doc:"Window-wide totals."` + Models []AdminInsightsAIModel `json:"models" doc:"Per-model totals, most tokens first, then most audio."` + Features []AdminInsightsAIFeature `json:"features" doc:"Per-feature totals, most tokens first, then most audio."` + Points []AdminInsightsAIPoint `json:"points" doc:"Daily UTC usage in ascending date order; days without usage are omitted."` +} + +type AdminInsightsAIOutput struct { + Body AdminInsightsAI +} + +func registerAdminInsightsAI(reg *Registry) { + Register(reg, insightsOp("ai", "getAdminInsightsAI", "Read AI token and transcribed-audio usage per provider model, Silo feature and UTC day."), func(ctx context.Context, in *AdminInsightsAIInput) (*AdminInsightsAIOutput, error) { + if reg.deps.AdminInsights == nil { + return nil, unavailable("insights") + } + res, err := reg.deps.AdminInsights.ReadAdminInsightsAI(ctx, handlers.AdminInsightsAIQuery{ + Range: in.Range, FromDate: in.FromDate, ToDate: in.ToDate, TZ: in.TZ, + }) + if err != nil || res == nil { + return nil, adminInsightsProblem(err) + } + return &AdminInsightsAIOutput{Body: adminInsightsAIOf(res)}, nil + }) +} + +func aiUsageOf(t usage.Totals) AdminInsightsAIUsage { + return AdminInsightsAIUsage{ + Requests: t.Requests, InputTokens: t.InputTokens, CachedInputTokens: t.CachedInputTokens, + OutputTokens: t.OutputTokens, TotalTokens: t.Tokens(), AudioSeconds: t.AudioSeconds, + } +} + +func adminInsightsAIOf(res *handlers.AdminInsightsAI) AdminInsightsAI { + r := res.Report + body := AdminInsightsAI{ + From: NewInstant(res.From), To: NewInstant(res.To), TrackingSince: utcDateOf(res.TrackingSince), + Summary: aiUsageOf(r.Summary), + Models: make([]AdminInsightsAIModel, 0, len(r.Models)), + Features: make([]AdminInsightsAIFeature, 0, len(r.Features)), + Points: make([]AdminInsightsAIPoint, 0, len(r.Points)), + } + for _, m := range r.Models { + provider := res.Providers[m.ProviderID] + body.Models = append(body.Models, AdminInsightsAIModel{ + AdminInsightsAIUsage: aiUsageOf(m.Totals), Key: usage.ModelKey(m.ProviderID, m.Model), + ProviderID: m.ProviderID, ProviderName: provider.Name, ProviderType: provider.Type, Model: m.Model, + }) + } + for _, f := range r.Features { + body.Features = append(body.Features, AdminInsightsAIFeature{AdminInsightsAIUsage: aiUsageOf(f.Totals), Feature: string(f.Feature), Models: f.Models}) + } + for _, p := range r.Points { + byFeature := make(map[string]int64, len(p.TokensByFeature)) + for f, n := range p.TokensByFeature { + byFeature[string(f)] = n + } + body.Points = append(body.Points, AdminInsightsAIPoint{ + Date: p.Date, InputTokens: p.InputTokens, OutputTokens: p.OutputTokens, + TokensByModel: p.TokensByModel, TokensByFeature: byFeature, + }) + } + return body +} + +// utcDateOf is t's UTC calendar day, or nil when t is. +func utcDateOf(t *time.Time) *string { + if t == nil { + return nil + } + day := t.UTC().Format(time.DateOnly) + return &day +} diff --git a/internal/apiv2/admin_insights_test.go b/internal/apiv2/admin_insights_test.go index ef5d8ba764b..a972cbd3d36 100644 --- a/internal/apiv2/admin_insights_test.go +++ b/internal/apiv2/admin_insights_test.go @@ -7,6 +7,7 @@ import ( "testing" "time" + "github.com/Silo-Server/silo-server/internal/ai/usage" "github.com/Silo-Server/silo-server/internal/api/handlers" apimw "github.com/Silo-Server/silo-server/internal/api/middleware" "github.com/Silo-Server/silo-server/internal/auth" @@ -255,6 +256,36 @@ func (f *fakeAdminInsights) ReadAdminInsightsTitle(_ context.Context, q handlers }, nil } +func (f *fakeAdminInsights) ReadAdminInsightsAI(_ context.Context, _ handlers.AdminInsightsAIQuery) (*handlers.AdminInsightsAI, error) { + if f.err != nil { + return nil, f.err + } + day := fixedTime().Truncate(24 * time.Hour) + since := day.AddDate(0, 0, -40) + chat := usage.Totals{Requests: 812, InputTokens: 1_640_000, CachedInputTokens: 610_000, OutputTokens: 1_280_000} + asr := usage.Totals{Requests: 36, AudioSeconds: 14_400} + return &handlers.AdminInsightsAI{ + From: day.AddDate(0, 0, -29), To: fixedTime(), TrackingSince: &since, + Report: usage.Report{ + Summary: usage.Totals{Requests: 848, InputTokens: 1_640_000, CachedInputTokens: 610_000, OutputTokens: 1_280_000, AudioSeconds: 14_400}, + Models: []usage.ModelUsage{{ProviderID: "openai-1", Model: "gpt-5-mini", Totals: chat}, {ProviderID: "groq-1", Model: "whisper-large-v3-turbo", Totals: asr}}, + Features: []usage.FeatureUsage{ + {Feature: usage.FeatureSubtitleTranslation, Models: []string{"gpt-5-mini"}, Totals: chat}, + {Feature: usage.FeatureTranscription, Models: []string{"whisper-large-v3-turbo"}, Totals: asr}, + }, + Points: []usage.DayUsage{{ + Date: fixedTime().Format("2006-01-02"), InputTokens: 1_640_000, OutputTokens: 1_280_000, + TokensByModel: map[string]int64{usage.ModelKey("openai-1", "gpt-5-mini"): 2_920_000}, + TokensByFeature: map[usage.Feature]int64{usage.FeatureSubtitleTranslation: 2_920_000}, + }}, + }, + Providers: map[string]handlers.AdminInsightsAIProvider{ + "openai-1": {Name: "OpenAI", Type: "openai"}, + "groq-1": {Name: "Groq", Type: "groq"}, + }, + }, nil +} + func adminInsightsFixtureCases() []fixtureCase { return []fixtureCase{ {name: "get_admin_insights_capabilities_ok", operationID: "getAdminInsightsCapabilities", method: http.MethodGet, path: Prefix + "/admin/insights/capabilities", headers: actingRequestAdmin, status: 200, assertHeaders: []string{"Content-Type", "Cache-Control", "ETag"}, schema: "#/components/schemas/AdminInsightsCapabilities", scenario: "Administrator insights capabilities advertise available Monitor -> Insights tabs and archival datasets."}, @@ -264,6 +295,7 @@ func adminInsightsFixtureCases() []fixtureCase { {name: "get_admin_insights_bandwidth_ok", operationID: "getAdminInsightsBandwidth", method: http.MethodGet, path: Prefix + "/admin/insights/bandwidth?range=30d&tz=UTC", headers: actingRequestAdmin, status: 200, assertHeaders: []string{"Content-Type", "Cache-Control"}, schema: "#/components/schemas/AdminInsightsBandwidth", scenario: "Administrator insights bandwidth returns daily archive + live egress totals and per-node breakdown."}, {name: "get_admin_insights_titles_ok", operationID: "getAdminInsightsTitles", method: http.MethodGet, path: Prefix + "/admin/insights/titles?range=30d&tz=UTC&sort=plays&limit=10", headers: actingRequestAdmin, status: 200, assertHeaders: []string{"Content-Type", "Cache-Control"}, schema: "#/components/schemas/AdminInsightsTitles", scenario: "Administrator insights titles ranks the most watched movies, series and libraries."}, {name: "get_admin_insights_title_ok", operationID: "getAdminInsightsTitle", method: http.MethodGet, path: Prefix + "/admin/insights/titles/series-1?range=30d&tz=UTC", headers: actingRequestAdmin, status: 200, assertHeaders: []string{"Content-Type", "Cache-Control"}, schema: "#/components/schemas/AdminInsightsTitle", scenario: "Administrator insights title detail returns a series' plays over time, viewers, and episodes."}, + {name: "get_admin_insights_ai_ok", operationID: "getAdminInsightsAI", method: http.MethodGet, path: Prefix + "/admin/insights/ai?range=30d", headers: actingRequestAdmin, status: 200, assertHeaders: []string{"Content-Type", "Cache-Control"}, schema: "#/components/schemas/AdminInsightsAI", scenario: "Administrator insights AI usage returns token and audio totals per model, feature and UTC day."}, {name: "get_admin_insights_library_ok", operationID: "getAdminInsightsLibrary", method: http.MethodGet, path: Prefix + "/admin/insights/library?range=30d&tz=UTC", headers: actingRequestAdmin, status: 200, assertHeaders: []string{"Content-Type", "Cache-Control"}, schema: "#/components/schemas/AdminInsightsLibrary", scenario: "Administrator insights library returns per-library coverage, plays by genre, decade and rating, and how soon new titles get a first play."}, } } @@ -294,6 +326,7 @@ func TestAdminInsightsValidationAndMonitorScope(t *testing.T) { "/admin/insights/titles?range=30d&refresh=true", "/admin/insights/titles/series-1?range=30d", "/admin/insights/library?range=30d&refresh=true", + "/admin/insights/ai?range=30d&refresh=true", "/admin/playback-history/sess-1", } { rec := do(t, h, http.MethodGet, Prefix+path, "", bearer("sa_monitor")) diff --git a/internal/backup/tables.go b/internal/backup/tables.go index ee50f4c3cfe..ec983fa6878 100644 --- a/internal/backup/tables.go +++ b/internal/backup/tables.go @@ -51,7 +51,7 @@ const tableIntroFingerprints = "media_intro_fingerprints" // restoredDataTables are the server's data: the library, catalog, // metadata, accounts and profiles with their data, and configuration. var restoredDataTables = strings.Fields(` - abs_bookmarks abs_ereader_devices abs_hidden_continue_series access_groups admin_dashboard_layouts admin_playback_history anime_ids + abs_bookmarks abs_ereader_devices abs_hidden_continue_series access_groups admin_dashboard_layouts admin_playback_history ai_usage_daily anime_ids audiobook_chapter_overrides audiobook_series autoscan_settings autoscan_sources client_diagnostic_reports dashboard_metric_daily dashboard_node_egress_daily download_artifacts download_subscriptions downloaded_subtitles downloads ebook_reader_annotations ebook_reader_config diff --git a/internal/metadata/translation/service.go b/internal/metadata/translation/service.go index e1b87339be4..34acb6c49db 100644 --- a/internal/metadata/translation/service.go +++ b/internal/metadata/translation/service.go @@ -15,6 +15,7 @@ import ( "github.com/Silo-Server/silo-server/internal/ai/jobrunner" "github.com/Silo-Server/silo-server/internal/ai/llm" aitranslate "github.com/Silo-Server/silo-server/internal/ai/translate" + "github.com/Silo-Server/silo-server/internal/ai/usage" "github.com/Silo-Server/silo-server/internal/models" "github.com/Silo-Server/silo-server/internal/subtitles" ) @@ -496,7 +497,7 @@ func (s *Service) translateFields(ctx context.Context, job *Job, fields []field, segments[i] = aitranslate.Segment{ID: f.segmentID(), Text: f.text} } offset := sent - _, translateErr = aitranslate.Translate(persistCtx, s.chat, aitranslate.Request{ + _, translateErr = aitranslate.Translate(usage.WithFeature(persistCtx, usage.FeatureMetadataTranslation), s.chat, aitranslate.Request{ Segments: segments, SystemPrompt: systemPrompt(group.srcName, tgtName, meta.title, meta.year), TargetName: tgtName, diff --git a/internal/recommendations/embeddings/client.go b/internal/recommendations/embeddings/client.go index 6325fd917e1..58c79f30a22 100644 --- a/internal/recommendations/embeddings/client.go +++ b/internal/recommendations/embeddings/client.go @@ -16,23 +16,28 @@ import ( "time" "github.com/Silo-Server/silo-server/internal/ai/llm" + "github.com/Silo-Server/silo-server/internal/ai/usage" "github.com/Silo-Server/silo-server/internal/logredact" ) // ClientConfig holds embedding client configuration. type ClientConfig struct { - BaseURL string - Model string - APIKey string // empty for Ollama + // ProviderID is the AI provider registry entry; usage is filed under it. + ProviderID string + BaseURL string + Model string + APIKey string // empty for Ollama } // Client calls an embeddings API (OpenAI-compatible or Gemini). type Client struct { cfg ClientConfig - // apiKey replaces cfg.APIKey so a rotated provider key reaches later - // requests without rebuilding the client. - apiKey atomic.Pointer[string] + // cred replaces cfg.ProviderID and cfg.APIKey so a rotated provider key + // reaches later requests without rebuilding the client, and usage is + // filed under the provider whose key served the request. + cred atomic.Pointer[credential] httpClient *http.Client + usage usage.Recorder } // NewClient creates a new embedding client. @@ -46,14 +51,38 @@ func NewClient(cfg ClientConfig) *Client { return http.ErrUseLastResponse }}, } - c.SetAPIKey(cfg.APIKey) + c.SetCredential(cfg.ProviderID, cfg.APIKey) return c } -// SetAPIKey replaces the key later Embed calls send. A call in flight keeps -// the key it started with. -func (c *Client) SetAPIKey(key string) { - c.apiKey.Store(&key) +type credential struct { + providerID string + apiKey string +} + +// SetCredential replaces the provider and key later Embed calls use. A call +// in flight keeps the ones it started with. +func (c *Client) SetCredential(providerID, key string) { + c.cred.Store(&credential{providerID: providerID, apiKey: key}) +} + +// SetUsageRecorder installs the recorder every answered request reports to. +// Call it before the client serves requests; nil records nothing. +func (c *Client) SetUsageRecorder(r usage.Recorder) { + c.usage = r +} + +// recordUsage files one 200 reply. Embedding models bill input only. Like +// the chat client, a reply counts when Silo could use it (usable: its vectors +// passed every check) or the provider reported usage for it; a refusal or +// rejected reply without usage bills nothing. +func (c *Client) recordUsage(ctx context.Context, providerID string, inputTokens int64, usable bool) { + if c.usage == nil || (!usable && inputTokens == 0) { + return + } + c.usage.Record(ctx, usage.Usage{ + ProviderID: providerID, Model: c.cfg.Model, Feature: usage.FeatureEmbeddings, InputTokens: inputTokens, + }) } // isGemini returns true if the base URL points to the Google Generative AI API. @@ -75,6 +104,12 @@ type embeddingResponse struct { // used instead. Index *int `json:"index"` } `json:"data"` + // Usage is decoded on its own by read, leniently. + Usage embeddingUsage `json:"-"` +} + +type embeddingUsage struct { + PromptTokens usage.Count `json:"prompt_tokens"` } // --- Gemini types --- @@ -100,6 +135,12 @@ type geminiEmbedResponse struct { Embeddings []struct { Values []float32 `json:"values"` } `json:"embeddings"` + // UsageMetadata is decoded on its own by read, leniently. + UsageMetadata geminiUsage `json:"-"` +} + +type geminiUsage struct { + PromptTokenCount usage.Count `json:"promptTokenCount"` } // maxRetryDelay caps how long one retry waits after a 429. A provider that @@ -224,7 +265,8 @@ func (c *Client) embedOpenAI(ctx context.Context, texts []string) ([][]float32, if llm.HasAPIVersion(c.cfg.BaseURL) { url = strings.TrimRight(c.cfg.BaseURL, "/") + "/embeddings" } - apiKey := *c.apiKey.Load() + cred := *c.cred.Load() + apiKey := cred.apiKey maxAttempts := 6 var resp *http.Response @@ -296,22 +338,42 @@ func (c *Client) embedOpenAI(ctx context.Context, texts []string) ([][]float32, defer resp.Body.Close() var embResp embeddingResponse - if err := json.NewDecoder(resp.Body).Decode(&embResp); err != nil { - return nil, fmt.Errorf("decode embedding response: %w", err) + results, err := embResp.read(resp.Body, len(texts)) + c.recordUsage(ctx, cred.providerID, int64(embResp.Usage.PromptTokens), err == nil) + if err != nil { + return nil, err } + return results, nil +} - if len(embResp.Data) != len(texts) { - return nil, fmt.Errorf("embedding API returned %d vectors for %d inputs", len(embResp.Data), len(texts)) +// read decodes an OpenAI-compatible reply into r and returns one checked +// vector per input. r keeps the reported usage when the vectors are rejected. +func (r *embeddingResponse) read(body io.Reader, inputs int) ([][]float32, error) { + raw, err := io.ReadAll(body) + if err != nil { + return nil, fmt.Errorf("read embedding response: %w", err) + } + // A malformed usage object reads as no usage and never rejects the vectors. + var meta struct { + Usage embeddingUsage `json:"usage"` + } + _ = json.Unmarshal(raw, &meta) + r.Usage = meta.Usage + if err := json.Unmarshal(raw, r); err != nil { + return nil, fmt.Errorf("decode embedding response: %w", err) } - results := make([][]float32, len(texts)) - filled := make([]bool, len(texts)) - for i, d := range embResp.Data { + if len(r.Data) != inputs { + return nil, fmt.Errorf("embedding API returned %d vectors for %d inputs", len(r.Data), inputs) + } + results := make([][]float32, inputs) + filled := make([]bool, inputs) + for i, d := range r.Data { index := i if d.Index != nil { index = *d.Index } if index < 0 || index >= len(results) || filled[index] { - return nil, fmt.Errorf("embedding API returned an invalid or repeated index %d for %d inputs", index, len(texts)) + return nil, fmt.Errorf("embedding API returned an invalid or repeated index %d for %d inputs", index, inputs) } results[index] = d.Embedding filled[index] = true @@ -342,7 +404,8 @@ func (c *Client) embedGemini(ctx context.Context, texts []string) ([][]float32, // The key travels in a header: a URL query parameter would surface in // transport errors, which quote the request URL. url := fmt.Sprintf("%s/v1beta/%s:batchEmbedContents", c.cfg.BaseURL, modelRef) - apiKey := *c.apiKey.Load() + cred := *c.cred.Load() + apiKey := cred.apiKey maxAttempts := 6 var resp *http.Response @@ -408,15 +471,36 @@ func (c *Client) embedGemini(ctx context.Context, texts []string) ([][]float32, defer resp.Body.Close() var gresp geminiEmbedResponse - if err := json.NewDecoder(resp.Body).Decode(&gresp); err != nil { - return nil, fmt.Errorf("decode gemini embedding response: %w", err) + results, err := gresp.read(resp.Body, len(texts)) + // Older batchEmbedContents responses carry no usageMetadata and record 0. + c.recordUsage(ctx, cred.providerID, int64(gresp.UsageMetadata.PromptTokenCount), err == nil) + if err != nil { + return nil, err } + return results, nil +} - if len(gresp.Embeddings) != len(texts) { - return nil, fmt.Errorf("gemini embedding API returned %d vectors for %d inputs", len(gresp.Embeddings), len(texts)) +// read decodes a batchEmbedContents reply into r and returns one checked +// vector per input. r keeps the reported usage when the vectors are rejected. +func (r *geminiEmbedResponse) read(body io.Reader, inputs int) ([][]float32, error) { + raw, err := io.ReadAll(body) + if err != nil { + return nil, fmt.Errorf("read gemini embedding response: %w", err) + } + // Malformed usage metadata reads as no usage and never rejects the vectors. + var meta struct { + UsageMetadata geminiUsage `json:"usageMetadata"` + } + _ = json.Unmarshal(raw, &meta) + r.UsageMetadata = meta.UsageMetadata + if err := json.Unmarshal(raw, r); err != nil { + return nil, fmt.Errorf("decode gemini embedding response: %w", err) + } + if len(r.Embeddings) != inputs { + return nil, fmt.Errorf("gemini embedding API returned %d vectors for %d inputs", len(r.Embeddings), inputs) } - results := make([][]float32, len(texts)) - for i, emb := range gresp.Embeddings { + results := make([][]float32, inputs) + for i, emb := range r.Embeddings { results[i] = emb.Values } if err := checkVectors(results); err != nil { diff --git a/internal/recommendations/embeddings/client_test.go b/internal/recommendations/embeddings/client_test.go index 1ac2129986f..2d8878bd272 100644 --- a/internal/recommendations/embeddings/client_test.go +++ b/internal/recommendations/embeddings/client_test.go @@ -6,10 +6,13 @@ import ( "errors" "io" "net/http" + "slices" "strings" "testing" "testing/synctest" "time" + + "github.com/Silo-Server/silo-server/internal/ai/usage" ) type embeddingTransport func(*http.Request) (*http.Response, error) @@ -275,3 +278,130 @@ func TestStatusErrorMasksCredentialsInTheBody(t *testing.T) { } } } + +type usageRows []usage.Usage + +func (r *usageRows) Record(_ context.Context, u usage.Usage) { *r = append(*r, u) } + +func TestEmbedRecordsUsage(t *testing.T) { + want := func(tokens int64) []usage.Usage { + return []usage.Usage{{ProviderID: "emb-1", Model: "test-model", Feature: usage.FeatureEmbeddings, InputTokens: tokens}} + } + for _, test := range []struct { + name, baseURL, body string + wantErr bool + want []usage.Usage + }{ + { + name: "OpenAI-compatible", + baseURL: "https://api.example.test/v1", + body: `{"data":[{"embedding":[0.1,0.2],"index":0}],"usage":{"prompt_tokens":42,"total_tokens":42}}`, + want: want(42), + }, + { + // An odd usage field never fails a usable reply. + name: "OpenAI-compatible fractional token count", + baseURL: "https://api.example.test/v1", + body: `{"data":[{"embedding":[0.1,0.2],"index":0}],"usage":{"prompt_tokens":3.0}}`, + want: want(3), + }, + {name: "OpenAI-compatible malformed usage", baseURL: "https://api.example.test/v1", body: `{"data":[{"embedding":[0.1,0.2],"index":0}],"usage":[]}`, want: want(0)}, + { + // A refusal inside a 200 bills nothing and is not counted. + name: "OpenAI-compatible error without usage", + baseURL: "https://api.example.test/v1", + body: `{"error":{"message":"overloaded"}}`, + wantErr: true, + }, + { + // An unusable reply the provider billed still counts. + name: "OpenAI-compatible unusable reply with usage", + baseURL: "https://api.example.test/v1", + body: `{"data":[],"usage":{"prompt_tokens":42}}`, + wantErr: true, + want: want(42), + }, + { + // An empty vector is rejected after the count matches; unbilled, it + // is not counted, and billed, the provider's tokens are kept. + name: "OpenAI-compatible empty vector without usage", + baseURL: "https://api.example.test/v1", + body: `{"data":[{"embedding":[],"index":0}]}`, + wantErr: true, + }, + { + name: "OpenAI-compatible empty vector with usage", + baseURL: "https://api.example.test/v1", + body: `{"data":[{"embedding":[],"index":0}],"usage":{"prompt_tokens":5}}`, + wantErr: true, + want: want(5), + }, + { + name: "Gemini empty vector without usage", + baseURL: "https://generativelanguage.googleapis.com", + body: `{"embeddings":[{"values":[]}]}`, + wantErr: true, + }, + { + name: "Gemini empty vector with usage", + baseURL: "https://generativelanguage.googleapis.com", + body: `{"embeddings":[{"values":[]}],"usageMetadata":{"promptTokenCount":5}}`, + wantErr: true, + want: want(5), + }, + { + name: "Gemini with usage metadata", + baseURL: "https://generativelanguage.googleapis.com", + body: `{"embeddings":[{"values":[0.1,0.2]}],"usageMetadata":{"promptTokenCount":17}}`, + want: want(17), + }, + {name: "Gemini malformed usage metadata", baseURL: "https://generativelanguage.googleapis.com", body: `{"embeddings":[{"values":[0.1,0.2]}],"usageMetadata":[]}`, want: want(0)}, + { + // Older Gemini responses report no tokens; the request still counts. + name: "Gemini", + baseURL: "https://generativelanguage.googleapis.com", + body: `{"embeddings":[{"values":[0.1,0.2]}]}`, + want: want(0), + }, + { + name: "Gemini error without usage", + baseURL: "https://generativelanguage.googleapis.com", + body: `{"error":{"message":"overloaded"}}`, + wantErr: true, + }, + } { + t.Run(test.name, func(t *testing.T) { + c := NewClient(ClientConfig{ProviderID: "emb-1", BaseURL: test.baseURL, Model: "test-model", APIKey: "k"}) + var rows usageRows + c.SetUsageRecorder(&rows) + c.httpClient.Transport = embeddingTransport(func(*http.Request) (*http.Response, error) { + return embeddingHTTPResponse(http.StatusOK, test.body, ""), nil + }) + if _, err := c.Embed(t.Context(), []string{"hello"}); (err != nil) != test.wantErr { + t.Fatalf("Embed error = %v, want error %v", err, test.wantErr) + } + if !slices.Equal(rows, test.want) { + t.Fatalf("recorded %+v, want %+v", rows, test.want) + } + }) + } +} + +func TestEmbedFilesUsageUnderTheCurrentProvider(t *testing.T) { + c := NewClient(ClientConfig{ProviderID: "emb-1", BaseURL: "https://api.example.test/v1", Model: "test-model", APIKey: "old"}) + var rows usageRows + c.SetUsageRecorder(&rows) + var sentKey string + c.httpClient.Transport = embeddingTransport(func(r *http.Request) (*http.Response, error) { + sentKey = r.Header.Get("Authorization") + return embeddingHTTPResponse(http.StatusOK, `{"data":[{"embedding":[0.1],"index":0}],"usage":{"prompt_tokens":3}}`, ""), nil + }) + // A reload that moves the same endpoint and model to another registry entry. + c.SetCredential("emb-2", "new") + if _, err := c.Embed(t.Context(), []string{"hello"}); err != nil { + t.Fatal(err) + } + if sentKey != "Bearer new" || len(rows) != 1 || rows[0].ProviderID != "emb-2" { + t.Fatalf("sent %q, recorded %+v; want the new key filed under emb-2", sentKey, rows) + } +} diff --git a/internal/recommendations/engine.go b/internal/recommendations/engine.go index d9fdf7ea643..02c2b598f8f 100644 --- a/internal/recommendations/engine.go +++ b/internal/recommendations/engine.go @@ -9,6 +9,7 @@ import ( "github.com/jackc/pgx/v5/pgxpool" "github.com/Silo-Server/silo-server/internal/access" + "github.com/Silo-Server/silo-server/internal/ai/usage" "github.com/Silo-Server/silo-server/internal/catalog" "github.com/Silo-Server/silo-server/internal/config" "github.com/Silo-Server/silo-server/internal/recommendations/embeddings" @@ -40,9 +41,9 @@ type Engine struct { storeProvider userstore.UserStoreProvider signals *SignalReader embClient embedder - // embKeys swaps the embedding client's key on a config reload; nil when + // embKeys swaps the embedding client's provider and key on a config reload; nil when // the client cannot change keys (test fakes). - embKeys interface{ SetAPIKey(string) } + embKeys interface{ SetCredential(providerID, key string) } cfg config.RecommendationsConfig pool *pgxpool.Pool unrated access.UnratedContentPolicy @@ -85,6 +86,14 @@ func (e *Engine) WithUserStoreOutsidePostgres(outside bool) *Engine { return e } +// WithUsageRecorder reports each answered embedding request to r. +func (e *Engine) WithUsageRecorder(r usage.Recorder) *Engine { + if c, ok := e.embClient.(*embeddings.Client); ok { + c.SetUsageRecorder(r) + } + return e +} + // NewEngine creates a new recommendation Engine. func NewEngine( pool *pgxpool.Pool, @@ -97,9 +106,10 @@ func NewEngine( repo := NewRepo(pool) embCfg := embeddings.ClientConfig{ - BaseURL: cfg.EmbeddingBaseURL, - Model: cfg.EmbeddingModel, - APIKey: cfg.EmbeddingAuthToken, + ProviderID: cfg.EmbeddingProviderID, + BaseURL: cfg.EmbeddingBaseURL, + Model: cfg.EmbeddingModel, + APIKey: cfg.EmbeddingAuthToken, } embClient := embeddings.NewClient(embCfg) @@ -118,9 +128,9 @@ func NewEngine( } } -// ApplyEmbeddingCredential installs the key a reloaded configuration resolves -// for the endpoint and model this engine runs, so rotating the provider's key -// needs no restart. A configuration that moved embeddings to another endpoint +// ApplyEmbeddingCredential installs the provider and key a reloaded +// configuration resolves for the endpoint and model this engine runs, so +// rotating the provider's key needs no restart. A configuration that moved embeddings to another endpoint // or model waits for the restart that applies it, so its key never reaches the // endpoint this engine still calls. func (e *Engine) ApplyEmbeddingCredential(cfg config.RecommendationsConfig) { @@ -130,7 +140,7 @@ func (e *Engine) ApplyEmbeddingCredential(cfg config.RecommendationsConfig) { if cfg.EmbeddingBaseURL != e.cfg.EmbeddingBaseURL || cfg.EmbeddingModel != e.cfg.EmbeddingModel { return } - e.embKeys.SetAPIKey(cfg.EmbeddingAuthToken) + e.embKeys.SetCredential(cfg.EmbeddingProviderID, cfg.EmbeddingAuthToken) } // embeddingConfigured reports whether an embedding provider and model are diff --git a/internal/subtitles/ai/translator.go b/internal/subtitles/ai/translator.go index a695b0fbfa9..19a1e51e98f 100644 --- a/internal/subtitles/ai/translator.go +++ b/internal/subtitles/ai/translator.go @@ -9,6 +9,7 @@ import ( "github.com/Silo-Server/silo-server/internal/ai/llm" aitranslate "github.com/Silo-Server/silo-server/internal/ai/translate" + "github.com/Silo-Server/silo-server/internal/ai/usage" ) // LLMTranslator translates subtitle cues with an OpenAI-compatible chat model @@ -78,7 +79,7 @@ func (t *LLMTranslator) Translate(ctx context.Context, req TranslateRequest, onB {Role: "system", Content: system}, {Role: "user", Content: user}, } - content, err := t.client.Chat(ctx, messages, true) + content, err := t.client.Chat(usage.WithFeature(ctx, usage.FeatureSubtitleTranslation), messages, true) if err != nil { return "", &providerError{err: err} } diff --git a/migrations/sql/20261203132749_add_ai_usage_daily.sql b/migrations/sql/20261203132749_add_ai_usage_daily.sql new file mode 100644 index 00000000000..0ed8a0f3602 --- /dev/null +++ b/migrations/sql/20261203132749_add_ai_usage_daily.sql @@ -0,0 +1,18 @@ +-- +goose Up +-- Daily AI usage per provider, model and feature, summed across every API +-- replica. Rows are small and few, so they are kept indefinitely. +CREATE TABLE public.ai_usage_daily ( + day date NOT NULL, + provider_id text NOT NULL, + model text NOT NULL, + feature text NOT NULL, + requests bigint NOT NULL DEFAULT 0, + input_tokens bigint NOT NULL DEFAULT 0, + cached_input_tokens bigint NOT NULL DEFAULT 0, + output_tokens bigint NOT NULL DEFAULT 0, + audio_seconds double precision NOT NULL DEFAULT 0, + PRIMARY KEY (day, provider_id, model, feature) +); + +-- +goose Down +DROP TABLE IF EXISTS public.ai_usage_daily; diff --git a/scripts/ci/db-contracts.txt b/scripts/ci/db-contracts.txt index ddce0638763..8fb1abfa55a 100644 --- a/scripts/ci/db-contracts.txt +++ b/scripts/ci/db-contracts.txt @@ -1830,6 +1830,10 @@ ./internal/backup TestCarryCredentialsReconcilesRestoredStreamNodesDB ./internal/backup TestCarryCredentialsKeepsNodeSamplesWithoutDailyArchiveDB +# AI usage: concurrent replicas add to the same daily rows, and the Insights +# report sums them by model, feature and UTC day. +./internal/ai/usage TestUsageStoreSumsRequestsIntoDailyReportDB + # Image cache queue metrics count future-deferred retries in queued depth while # reporting oldest queued age only for due rows (next_attempt_at <= NOW()). ./internal/workmetrics TestQueueSamplerImagesReportsDueQueuedAgeDB diff --git a/web/src/api/v2/operations.ts b/web/src/api/v2/operations.ts index 75438416f47..1d1ef3e0dc1 100644 --- a/web/src/api/v2/operations.ts +++ b/web/src/api/v2/operations.ts @@ -190,6 +190,7 @@ export const v2Operations = { "GET /api/v2/admin/history-imports/runs/{id}": "getAdminHistoryImportRun", "GET /api/v2/admin/history-imports/sources/{id}/users": "listAdminHistoryImportExternalUsers", "GET /api/v2/admin/insights/activity": "getAdminInsightsActivity", + "GET /api/v2/admin/insights/ai": "getAdminInsightsAI", "GET /api/v2/admin/insights/bandwidth": "getAdminInsightsBandwidth", "GET /api/v2/admin/insights/capabilities": "getAdminInsightsCapabilities", "GET /api/v2/admin/insights/devices": "getAdminInsightsDevices", diff --git a/web/src/api/v2/schema.ts b/web/src/api/v2/schema.ts index f0beaf19404..2508d2e5d06 100644 --- a/web/src/api/v2/schema.ts +++ b/web/src/api/v2/schema.ts @@ -2367,6 +2367,23 @@ export interface paths { patch?: never; trace?: never; }; + "/api/v2/admin/insights/ai": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Read AI token and transcribed-audio usage per provider model, Silo feature and UTC day. */ + get: operations["getAdminInsightsAI"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/v2/admin/insights/bandwidth": { parameters: { query?: never; @@ -19861,6 +19878,167 @@ export interface components { /** Format: double */ share_of_adapted: number; }; + AdminInsightsAI: { + /** @description Per-feature totals, most tokens first, then most audio. */ + features: components["schemas"]["AdminInsightsAIFeature"][]; + /** + * Format: date-time + * @description Start of the first UTC day read; usage is kept per UTC day, so a window in another timezone reads the UTC days it covers by date. + */ + from: string; + /** @description Per-model totals, most tokens first, then most audio. */ + models: components["schemas"]["AdminInsightsAIModel"][]; + /** @description Daily UTC usage in ascending date order; days without usage are omitted. */ + points: components["schemas"]["AdminInsightsAIPoint"][]; + /** @description Window-wide totals. */ + summary: components["schemas"]["AdminInsightsAIUsage"]; + /** + * Format: date-time + * @description End of the window: now, or for range=custom the exclusive end of the last UTC day read. + */ + to: string; + /** + * Format: date + * @description First UTC day (YYYY-MM-DD) Silo counted AI usage, or null when unknown. Earlier requests were not recorded. + */ + tracking_since: string | null; + }; + AdminInsightsAIFeature: { + /** + * Format: double + * @description Seconds of audio transcribed; speech models report audio instead of tokens. + */ + audio_seconds: number; + /** + * Format: int64 + * @description Input tokens the provider served from its prompt cache. + */ + cached_input_tokens: number; + /** + * @description The Silo feature that made the requests. + * @enum {string} + */ + feature: + | "subtitle_translation" + | "metadata_translation" + | "transcription" + | "embeddings" + | "other"; + /** + * Format: int64 + * @description Input tokens, cached input included. + */ + input_tokens: number; + /** @description Models that served the feature, most tokens first. */ + models: string[]; + /** + * Format: int64 + * @description Output tokens, reasoning tokens included. + */ + output_tokens: number; + /** + * Format: int64 + * @description Provider requests answered, retries of a rejected answer included. + */ + requests: number; + /** + * Format: int64 + * @description input_tokens plus output_tokens. + */ + total_tokens: number; + }; + AdminInsightsAIModel: { + /** + * Format: double + * @description Seconds of audio transcribed; speech models report audio instead of tokens. + */ + audio_seconds: number; + /** + * Format: int64 + * @description Input tokens the provider served from its prompt cache. + */ + cached_input_tokens: number; + /** + * Format: int64 + * @description Input tokens, cached input included. + */ + input_tokens: number; + /** @description Identifies the provider's model in points[].tokens_by_model. */ + key: string; + model: string; + /** + * Format: int64 + * @description Output tokens, reasoning tokens included. + */ + output_tokens: number; + /** @description AI provider the requests went to; "chatgpt" for a connected ChatGPT plan. */ + provider_id: string; + /** @description The provider's current name; empty once the provider is removed. */ + provider_name: string; + /** @description The provider's type, such as openai or ollama; empty once the provider is removed. */ + provider_type: string; + /** + * Format: int64 + * @description Provider requests answered, retries of a rejected answer included. + */ + requests: number; + /** + * Format: int64 + * @description input_tokens plus output_tokens. + */ + total_tokens: number; + }; + AdminInsightsAIPoint: { + /** + * Format: date + * @description UTC calendar day (YYYY-MM-DD) + */ + date: string; + /** Format: int64 */ + input_tokens: number; + /** Format: int64 */ + output_tokens: number; + /** @description Input plus output tokens keyed by features[].feature. */ + tokens_by_feature: { + [key: string]: number; + }; + /** @description Input plus output tokens keyed by models[].key. */ + tokens_by_model: { + [key: string]: number; + }; + }; + AdminInsightsAIUsage: { + /** + * Format: double + * @description Seconds of audio transcribed; speech models report audio instead of tokens. + */ + audio_seconds: number; + /** + * Format: int64 + * @description Input tokens the provider served from its prompt cache. + */ + cached_input_tokens: number; + /** + * Format: int64 + * @description Input tokens, cached input included. + */ + input_tokens: number; + /** + * Format: int64 + * @description Output tokens, reasoning tokens included. + */ + output_tokens: number; + /** + * Format: int64 + * @description Provider requests answered, retries of a rejected answer included. + */ + requests: number; + /** + * Format: int64 + * @description input_tokens plus output_tokens. + */ + total_tokens: number; + }; AdminInsightsAudioUsage: { /** @description Sessions by audio handling: direct, remux (copied into a new container) or transcode */ decisions: components["schemas"]["AdminInsightsLabeledCount"][]; @@ -20019,6 +20197,8 @@ export interface components { unknown_location_sessions: number; }; AdminInsightsCapabilities: { + /** @description The AI usage read (getAdminInsightsAI) is served */ + ai_usage: boolean; /** @description Whether the current principal may use the capability */ allowed: boolean; available: boolean; @@ -64080,6 +64260,123 @@ export interface operations { }; }; }; + getAdminInsightsAI: { + parameters: { + query?: { + /** @description Inclusive local start date (YYYY-MM-DD in tz), required when range=custom */ + from_date?: string; + /** @description Preset time window or custom */ + range?: "7d" | "30d" | "90d" | "1y" | "all" | "custom"; + /** @description Accepted for parity with the other Insights reads; AI usage is never cached */ + refresh?: boolean; + /** @description Inclusive local end date (YYYY-MM-DD in tz), required when range=custom */ + to_date?: string; + /** @description IANA timezone identifier */ + tz?: string; + }; + header?: { + /** @description Optional. When present, it must name the authenticated account's primary profile; an absent header is accepted. */ + "X-Profile-Id"?: string; + /** @description Verification proof for a PIN-locked profile, issued by POST /api/v2/profiles/{id}/verify-pin; required only when the declared profile is locked */ + "X-Profile-Token"?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AdminInsightsAI"]; + }; + }; + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Forbidden */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Not Found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Not Acceptable */ + 406: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Too Many Requests */ + 429: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Internal Server Error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + /** @description Service Unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/problem+json": components["schemas"]["Problem"]; + }; + }; + }; + }; getAdminInsightsBandwidth: { parameters: { query?: { diff --git a/web/src/hooks/queries/admin/insights.ts b/web/src/hooks/queries/admin/insights.ts index b1d533c4c59..7b1e145e383 100644 --- a/web/src/hooks/queries/admin/insights.ts +++ b/web/src/hooks/queries/admin/insights.ts @@ -19,6 +19,7 @@ export type AdminInsightsActivity = V2Result<"GET /api/v2/admin/insights/activit export type AdminInsightsPeople = V2Result<"GET /api/v2/admin/insights/people">; export type AdminInsightsDevices = V2Result<"GET /api/v2/admin/insights/devices">; export type AdminInsightsBandwidth = V2Result<"GET /api/v2/admin/insights/bandwidth">; +export type AdminInsightsAI = V2Result<"GET /api/v2/admin/insights/ai">; export type AdminInsightsTitles = V2Result<"GET /api/v2/admin/insights/titles">; export type AdminInsightsTitle = V2Result<"GET /api/v2/admin/insights/titles/{content_id}">; export type AdminInsightsLibrary = V2Result<"GET /api/v2/admin/insights/library">; @@ -27,6 +28,7 @@ export type AdminInsightsActivityQuery = V2Query<"GET /api/v2/admin/insights/act export type AdminInsightsPeopleQuery = V2Query<"GET /api/v2/admin/insights/people">; export type AdminInsightsDevicesQuery = V2Query<"GET /api/v2/admin/insights/devices">; export type AdminInsightsBandwidthQuery = V2Query<"GET /api/v2/admin/insights/bandwidth">; +export type AdminInsightsAIQuery = V2Query<"GET /api/v2/admin/insights/ai">; export type AdminInsightsTitlesQuery = V2Query<"GET /api/v2/admin/insights/titles">; export type AdminInsightsTitleQuery = V2Query<"GET /api/v2/admin/insights/titles/{content_id}">; export type AdminInsightsLibraryQuery = V2Query<"GET /api/v2/admin/insights/library">; @@ -326,6 +328,22 @@ export function useAdminInsightsBandwidth( ); } +export function useAdminInsightsAI( + query: AdminInsightsAIQuery, + options: InsightTabQueryOptions = {}, +) { + return useAdminInsightQuery( + adminKeys.insightsAI(query as Record), + (profileContext, signal) => + v2("GET /api/v2/admin/insights/ai", { + query: withRefreshFlag(query), + profileContext, + signal, + }), + options, + ); +} + export function useAdminInsightsTitles( query: AdminInsightsTitlesQuery, options: InsightTabQueryOptions = {}, diff --git a/web/src/hooks/queries/keys.ts b/web/src/hooks/queries/keys.ts index 1785915f24c..5e0ff6bbf58 100644 --- a/web/src/hooks/queries/keys.ts +++ b/web/src/hooks/queries/keys.ts @@ -541,6 +541,7 @@ export const adminKeys = { ["admin", "insights", "devices", params] as const, insightsBandwidth: (params: Record) => ["admin", "insights", "bandwidth", params] as const, + insightsAI: (params: Record) => ["admin", "insights", "ai", params] as const, insightsTitles: (params: Record) => ["admin", "insights", "titles", params] as const, insightsLibrary: (params: Record) => diff --git a/web/src/locales/ar-XB.json b/web/src/locales/ar-XB.json index 4dae0f48b6d..c523fab5c98 100644 --- a/web/src/locales/ar-XB.json +++ b/web/src/locales/ar-XB.json @@ -50857,6 +50857,326 @@ "value": "\u202E is on your dashboard. Open the dashboard.\u202C" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "\u200F\u202EBy feature\u202C" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "\u200F\u202EBy model\u202C" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "\u200F\u202ENo tokens in this period\u202C" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "\u200F\u202EInput\u202C" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "\u200F\u202EAI tokens per day\u202C" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "\u200F\u202EOutput\u202C" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "\u200F\u202EInput and output tokens across every AI provider\u202C" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "\u200F\u202ETokens per day\u202C" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "\u200F\u202ETotal\u202C" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "\u200F\u202ECached\u202C" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "\u200F\u202EFeature\u202C" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "\u200F\u202EInput\u202C" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "\u200F\u202EModel\u202C" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "\u200F\u202EModels\u202C" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "\u200F\u202EOutput\u202C" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "\u200F\u202ERequests\u202C" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "\u200F\u202EShare\u202C" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "\u200F\u202ETotal\u202C" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "\u200F\u202EUsage\u202C" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "\u200F\u202ENo AI usage in this period.\u202C" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "\u200F\u202ERecommendations & search\u202C" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "\u200F\u202EMetadata translation\u202C" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "\u200F\u202ESubtitle translation\u202C" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "\u200F\u202ESubtitle transcription\u202C" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "\u200F\u202EOther\u202C" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "\u200F" + }, + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": "\u202E of audio\u202C" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "\u200F\u202EBy feature\u202C" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "\u200F\u202EAudio transcribed\u202C" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "\u200F\u202ESpeech models count audio, not tokens\u202C" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "\u200F\u202ERequests\u202C" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "\u200F" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": "\u202E per day on average\u202C" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "\u200F" + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": "\u202E in · \u202C" + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": "\u202E out\u202C" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "\u200F\u202EMost used model\u202C" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "\u200F" + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": "\u202E of tokens · \u202C" + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "\u200F\u202ETotal tokens\u202C" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "\u200F" + }, + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": "\u202E of audio\u202C" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "\u200F\u202ELocal\u202C" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "\u200F\u202ECached input is part of input. Reasoning tokens are part of output.\u202C" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "\u200F\u202ERemoved provider\u202C" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "\u200F\u202EBy model\u202C" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "\u200F" + }, + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": "\u202E tokens\u202C" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "\u200F\u202EAI usage is counted from \u202C" + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": "\u202E. Earlier requests were not recorded.\u202C" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -52951,6 +53271,12 @@ "value": "\u200F\u202EPlayback\u202C" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "\u200F\u202EAI usage\u202C" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/ar.json b/web/src/locales/ar.json index 1d73830164d..bc625ea791f 100644 --- a/web/src/locales/ar.json +++ b/web/src/locales/ar.json @@ -69375,6 +69375,302 @@ "value": " موجود على لوحة التحكم. افتح لوحة التحكم." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "حسب الميزة" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "حسب النموذج" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "لا رموز في هذه الفترة" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "الإدخال" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "رموز الذكاء الاصطناعي يوميًا" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "الإخراج" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "رموز الإدخال والإخراج عبر جميع مزودي الذكاء الاصطناعي" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "الرموز يوميًا" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "الإجمالي" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "المخزّن مؤقتًا" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "الميزة" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "الإدخال" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "النموذج" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "النماذج" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "الإخراج" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "الطلبات" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "النسبة" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "الإجمالي" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "الاستخدام" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "لا استخدام للذكاء الاصطناعي في هذه الفترة." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "التوصيات والبحث" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "ترجمة البيانات الوصفية" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "ترجمة نصوص الترجمة" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "تفريغ الكلام إلى ترجمة" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "أخرى" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " من الصوت" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "حسب الميزة" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "الصوت المُفرَّغ نصيًا" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "تحتسب نماذج الكلام مدة الصوت لا الرموز" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "الطلبات" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " يوميًا في المتوسط" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "الإدخال: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · الإخراج: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "النموذج الأكثر استخدامًا" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " من الرموز · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "إجمالي الرموز" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " من الصوت" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "محلي" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "الإدخال المخزّن مؤقتًا جزء من الإدخال. رموز الاستدلال جزء من الإخراج." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "مزود محذوف" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "حسب النموذج" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "الرموز: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "يُحتسب استخدام الذكاء الاصطناعي منذ " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". لم تُسجَّل الطلبات السابقة." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -72231,6 +72527,12 @@ "value": "التشغيل" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "استخدام الذكاء الاصطناعي" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/bg.json b/web/src/locales/bg.json index 2e69c46a9fd..1918278108b 100644 --- a/web/src/locales/bg.json +++ b/web/src/locales/bg.json @@ -48061,6 +48061,306 @@ "value": " е на вашето табло. Отворете таблото." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "По функция" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "По модел" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Няма токени за този период" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Вход" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Токени за ИИ на ден" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Изход" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Входни и изходни токени при всички доставчици на ИИ" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Токени на ден" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Общо" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Кеширани" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Функция" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Вход" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Модел" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Модели" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Изход" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Заявки" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Дял" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Общо" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Използване" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Няма използване на ИИ за този период." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Препоръки и търсене" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Превод на метаданни" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Превод на субтитри" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Транскрибиране на субтитри" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Други" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Аудио: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "По функция" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Транскрибирано аудио" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Речевите модели отчитат аудио, а не токени" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Заявки" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Средно " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " на ден" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Вход: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · Изход: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Най-използван модел" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " от токените · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Общо токени" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Аудио: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Локален" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Кешираните входни токени са част от входа. Токените за разсъждение са част от изхода." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Премахнат доставчик" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "По модел" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Токени: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Използването на ИИ се отчита от " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". По-ранните заявки не са записани." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49995,6 +50295,12 @@ "value": "Възпроизвеждане" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Използване на ИИ" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/ca.json b/web/src/locales/ca.json index e03431f963b..20370bb6454 100644 --- a/web/src/locales/ca.json +++ b/web/src/locales/ca.json @@ -53700,6 +53700,302 @@ "value": " és al teu tauler. Obre el tauler." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Per funció" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Per model" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "No hi ha tokens en aquest període" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokens d’IA per dia" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Sortida" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokens d’entrada i de sortida de tots els proveïdors d’IA" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens per dia" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "En memòria cau" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funció" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Models" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Sortida" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Sol·licituds" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Proporció" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Ús" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "No hi ha ús d’IA en aquest període." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recomanacions i cerca" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Traducció de metadades" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Traducció de subtítols" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transcripció de subtítols" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Altres" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " d’àudio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Per funció" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Àudio transcrit" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Els models de veu compten àudio, no tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Sol·licituds" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " al dia de mitjana" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " d’entrada · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " de sortida" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Model més utilitzat" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " dels tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total de tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " d’àudio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "L’entrada en memòria cau forma part de l’entrada. Els tokens de raonament formen part de la sortida." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Proveïdor eliminat" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Per model" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Inici del recompte de l’ús d’IA: " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Les sol·licituds anteriors no es van registrar." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55924,6 +56220,12 @@ "value": "Reproducció" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Ús d’IA" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/cs.json b/web/src/locales/cs.json index f1fd786818c..e0928e84965 100644 --- a/web/src/locales/cs.json +++ b/web/src/locales/cs.json @@ -59431,6 +59431,306 @@ "value": " je na vaší nástěnce. Otevřít nástěnku." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Podle funkce" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Podle modelu" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "V tomto období žádné tokeny" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Vstup" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokeny AI za den" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Výstup" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Vstupní a výstupní tokeny všech poskytovatelů AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokeny za den" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Celkem" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Z mezipaměti" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkce" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Vstup" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modely" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Výstup" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Požadavky" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Podíl" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Celkem" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Využití" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "V tomto období žádné využití AI." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Doporučení a vyhledávání" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Překlad metadat" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Překlad titulků" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Přepis titulků" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Ostatní" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " zvuku" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Podle funkce" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Přepsaný zvuk" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Řečové modely počítají délku zvuku, ne tokeny" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Požadavky" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Průměrně " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " za den" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Vstup: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · Výstup: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Nejpoužívanější model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " tokenů · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokeny celkem" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " zvuku" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Místní" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Vstup z mezipaměti je součástí vstupu. Tokeny uvažování jsou součástí výstupu." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Odebraný poskytovatel" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Podle modelu" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Tokeny: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Využití AI se počítá od " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Dřívější požadavky nebyly zaznamenány." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -61901,6 +62201,12 @@ "value": "Přehrávání" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Využití AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/da.json b/web/src/locales/da.json index bb00c565e77..9b2f14fcf07 100644 --- a/web/src/locales/da.json +++ b/web/src/locales/da.json @@ -47977,6 +47977,302 @@ "value": " er på dit dashboard. Åbn dashboardet." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Pr. funktion" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Pr. model" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Ingen tokens i denne periode" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI-tokens pr. dag" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Input- og outputtokens på tværs af alle AI-udbydere" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens pr. dag" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "I alt" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Cachelagret" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funktion" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeller" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Forespørgsler" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Andel" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "I alt" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Forbrug" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Intet AI-forbrug i denne periode." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Anbefalinger og søgning" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Oversættelse af metadata" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Oversættelse af undertekster" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transskription til undertekster" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Andet" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " lyd" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Pr. funktion" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transskriberet lyd" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Talemodeller tæller lyd, ikke tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Forespørgsler" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " pr. dag i gennemsnit" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " ind · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " ud" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Mest brugte model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " af tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokens i alt" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " lyd" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokal" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Cachelagret input indgår i input. Ræsonnementstokens indgår i output." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Fjernet udbyder" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Pr. model" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI-forbrug tælles fra den " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Tidligere forespørgsler blev ikke registreret." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49919,6 +50215,12 @@ "value": "Afspilning" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI-forbrug" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/de.json b/web/src/locales/de.json index 16d9a214fa8..3750eebf48f 100644 --- a/web/src/locales/de.json +++ b/web/src/locales/de.json @@ -47781,6 +47781,306 @@ "value": " ist auf deinem Dashboard. Dashboard öffnen." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Nach Funktion" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Nach Modell" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Keine Tokens in diesem Zeitraum" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Eingabe" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "KI-Tokens pro Tag" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Ausgabe" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Eingabe- und Ausgabe-Tokens über alle KI-Anbieter" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens pro Tag" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Gesamt" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Zwischengespeichert" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funktion" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Eingabe" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modell" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modelle" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Ausgabe" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Anfragen" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Anteil" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Gesamt" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Nutzung" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Keine KI-Nutzung in diesem Zeitraum." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Empfehlungen & Suche" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Übersetzung von Metadaten" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Übersetzung von Untertiteln" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkription von Untertiteln" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Sonstige" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " Audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Nach Funktion" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkribiertes Audio" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Sprachmodelle zählen Audio, keine Tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Anfragen" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Durchschnittlich " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " pro Tag" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " Eingabe · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " Ausgabe" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Meistgenutztes Modell" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " der Tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokens gesamt" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " Audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokal" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Zwischengespeicherte Eingabe ist Teil der Eingabe. Reasoning-Tokens sind Teil der Ausgabe." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Entfernter Anbieter" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Nach Modell" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " Tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Die KI-Nutzung wird seit " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": " erfasst. Frühere Anfragen wurden nicht aufgezeichnet." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49735,6 +50035,12 @@ "value": "Wiedergabe" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "KI-Nutzung" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/el.json b/web/src/locales/el.json index b5af13a6456..55687f36f84 100644 --- a/web/src/locales/el.json +++ b/web/src/locales/el.json @@ -48193,6 +48193,306 @@ "value": "» βρίσκεται στον πίνακα ελέγχου σας. Άνοιγμα του πίνακα ελέγχου." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Ανά λειτουργία" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Ανά μοντέλο" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Κανένα token σε αυτό το διάστημα" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Είσοδος" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Token AI ανά ημέρα" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Έξοδος" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Token εισόδου και εξόδου σε όλους τους παρόχους AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Token ανά ημέρα" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Σύνολο" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Από κρυφή μνήμη" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Λειτουργία" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Είσοδος" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Μοντέλο" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Μοντέλα" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Έξοδος" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Αιτήματα" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Ποσοστό" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Σύνολο" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Χρήση" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Καμία χρήση AI σε αυτό το διάστημα." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Προτάσεις και αναζήτηση" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Μετάφραση μεταδεδομένων" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Μετάφραση υποτίτλων" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Μεταγραφή ομιλίας σε υπότιτλους" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Άλλα" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ήχου" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Ανά λειτουργία" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Ήχος που μεταγράφηκε" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Τα μοντέλα ομιλίας μετρούν ήχο, όχι token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Αιτήματα" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Κατά μέσο όρο " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " ανά ημέρα" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Είσοδος: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · Έξοδος: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Μοντέλο με τη μεγαλύτερη χρήση" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " των token · Πάροχος: " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Συνολικά token" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ήχου" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Τοπικό" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Η είσοδος από την κρυφή μνήμη περιλαμβάνεται στην είσοδο. Τα token συλλογισμού περιλαμβάνονται στην έξοδο." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Πάροχος που αφαιρέθηκε" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Ανά μοντέλο" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Η χρήση AI καταμετράται από " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Τα προηγούμενα αιτήματα δεν καταγράφηκαν." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -50127,6 +50427,12 @@ "value": "Αναπαραγωγή" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Χρήση AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/en-XA.json b/web/src/locales/en-XA.json index cba82cdbcee..1275e126269 100644 --- a/web/src/locales/en-XA.json +++ b/web/src/locales/en-XA.json @@ -52521,6 +52521,330 @@ "value": " îš öñ ýöûŕ đåšĥƀöåŕđ. Öþéñ ţĥé đåšĥƀöåŕđ.~~~~~~~~~~~~~~~~~⟧" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "⟦Ɓý ƒéåţûŕé~~~~⟧" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "⟦Ɓý ɱöđéļ~~~~⟧" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "⟦Ñö ţöķéñš îñ ţĥîš þéŕîöđ~~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "⟦Îñþûţ~~⟧" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "⟦ÅÎ ţöķéñš þéŕ đåý~~~~~~~⟧" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "⟦Öûţþûţ~~~⟧" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "⟦Îñþûţ åñđ öûţþûţ ţöķéñš åçŕöšš éṽéŕý ÅÎ þŕöṽîđéŕ~~~~~~~~~~~~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "⟦Ţöķéñš þéŕ đåý~~~~~~⟧" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "⟦Ţöţåļ~~⟧" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "⟦Çåçĥéđ~~~⟧" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "⟦Ƒéåţûŕé~~~⟧" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "⟦Îñþûţ~~⟧" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "⟦Ṁöđéļ~~⟧" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "⟦Ṁöđéļš~~~⟧" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "⟦Öûţþûţ~~~⟧" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "⟦Ŕéǫûéšţš~~~~⟧" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "⟦Šĥåŕé~~⟧" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "⟦Ţöţåļ~~⟧" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "⟦Ûšåĝé~~⟧" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "⟦Ñö ÅÎ ûšåĝé îñ ţĥîš þéŕîöđ.~~~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "⟦Ŕéçöɱɱéñđåţîöñš & šéåŕçĥ~~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "⟦Ṁéţåđåţå ţŕåñšļåţîöñ~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "⟦Šûƀţîţļé ţŕåñšļåţîöñ~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "⟦Šûƀţîţļé ţŕåñšçŕîþţîöñ~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "⟦Öţĥéŕ~~⟧" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "⟦" + }, + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " öƒ åûđîö~~~~⟧" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "⟦Ɓý ƒéåţûŕé~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "⟦Åûđîö ţŕåñšçŕîƀéđ~~~~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "⟦Šþééçĥ ɱöđéļš çöûñţ åûđîö, ñöţ ţöķéñš~~~~~~~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "⟦Ŕéǫûéšţš~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "⟦" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " þéŕ đåý öñ åṽéŕåĝé~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "⟦" + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " îñ · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " öûţ~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "⟦Ṁöšţ ûšéđ ɱöđéļ~~~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "⟦" + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " öƒ ţöķéñš · " + }, + { + "type": 1, + "value": "provider" + }, + { + "type": 0, + "value": "~~~~~~⟧" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "⟦Ţöţåļ ţöķéñš~~~~~⟧" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "⟦" + }, + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " öƒ åûđîö~~~~⟧" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "⟦Ļöçåļ~~⟧" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "⟦Çåçĥéđ îñþûţ îš þåŕţ öƒ îñþûţ. Ŕéåšöñîñĝ ţöķéñš åŕé þåŕţ öƒ öûţþûţ.~~~~~~~~~~~~~~~~~~~~~~~~~~~⟧" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "⟦Ŕéɱöṽéđ þŕöṽîđéŕ~~~~~~~⟧" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "⟦Ɓý ɱöđéļ~~~~⟧" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "⟦" + }, + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " ţöķéñš~~~⟧" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "⟦ÅÎ ûšåĝé îš çöûñţéđ ƒŕöɱ " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Éåŕļîéŕ ŕéǫûéšţš ŵéŕé ñöţ ŕéçöŕđéđ.~~~~~~~~~~~~~~~~~~~~~~~~~⟧" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -54651,6 +54975,12 @@ "value": "⟦Þļåýƀåçķ~~~~⟧" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "⟦ÅÎ ûšåĝé~~~~⟧" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 5b1432e1117..cb1b01d89e6 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -48081,6 +48081,302 @@ "value": " is on your dashboard. Open the dashboard." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "By feature" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "By model" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "No tokens in this period" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI tokens per day" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Input and output tokens across every AI provider" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens per day" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Cached" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Feature" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Models" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Requests" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Share" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Usage" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "No AI usage in this period." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recommendations & search" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metadata translation" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Subtitle translation" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Subtitle transcription" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Other" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " of audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "By feature" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio transcribed" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Speech models count audio, not tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Requests" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " per day on average" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " in · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " out" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Most used model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " of tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " of audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Cached input is part of input. Reasoning tokens are part of output." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Removed provider" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "By model" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI usage is counted from " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Earlier requests were not recorded." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -50023,6 +50319,12 @@ "value": "Playback" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI usage" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/es.json b/web/src/locales/es.json index 0dda18ce321..53cb1697c46 100644 --- a/web/src/locales/es.json +++ b/web/src/locales/es.json @@ -53668,6 +53668,302 @@ "value": " está en tu panel. Abrir el panel." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Por función" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Por modelo" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "No hay tokens en este período" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokens de IA por día" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Salida" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokens de entrada y salida de todos los proveedores de IA" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens por día" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "En caché" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Función" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modelo" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modelos" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Salida" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Solicitudes" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Proporción" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Uso" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "No hay uso de IA en este período." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recomendaciones y búsqueda" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Traducción de metadatos" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Traducción de subtítulos" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transcripción de subtítulos" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Otros" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " de audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Por función" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio transcrito" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Los modelos de voz miden audio, no tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Solicitudes" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " al día de media" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " de entrada · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " de salida" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Modelo más usado" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " de los tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total de tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " de audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "La entrada en caché forma parte de la entrada. Los tokens de razonamiento forman parte de la salida." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Proveedor eliminado" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Por modelo" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "El uso de IA se cuenta desde el " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Las solicitudes anteriores no se registraron." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55892,6 +56188,12 @@ "value": "Reproducción" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Uso de IA" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/et.json b/web/src/locales/et.json index 2da2e1f9dec..e60e5007c40 100644 --- a/web/src/locales/et.json +++ b/web/src/locales/et.json @@ -48429,6 +48429,306 @@ "value": " on teie juhtpaneelil. Ava juhtpaneel." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Funktsioonide kaupa" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Mudelite kaupa" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Selles ajavahemikus pole tokeneid" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Sisend" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI-tokenid päevas" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Väljund" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Sisend- ja väljundtokenid kõigi AI-teenusepakkujate peale kokku" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokenid päevas" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Kokku" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Vahemälust" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funktsioon" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Sisend" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Mudel" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Mudelid" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Väljund" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Päringud" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Osakaal" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Kokku" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Kasutus" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Selles ajavahemikus pole AI-kasutust." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Soovitused ja otsing" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metaandmete tõlkimine" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Subtiitrite tõlkimine" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Subtiitrite transkribeerimine" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Muu" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Heli: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Funktsioonide kaupa" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkribeeritud heli" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Kõnemudelid arvestavad heli pikkust, mitte tokeneid" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Päringud" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Keskmiselt " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " päevas" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Sisend: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · Väljund: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Enim kasutatud mudel" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " tokenitest · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokenid kokku" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Heli: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Kohalik" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Vahemälust loetud sisend on osa sisendist. Arutlustokenid on osa väljundist." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Eemaldatud teenusepakkuja" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Mudelite kaupa" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokenit" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI-kasutust arvestatakse alates kuupäevast " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Varasemaid päringuid ei salvestatud." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -50363,6 +50663,12 @@ "value": "Esitus" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI-kasutus" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/fi.json b/web/src/locales/fi.json index b4c7be7ac04..d0552e24158 100644 --- a/web/src/locales/fi.json +++ b/web/src/locales/fi.json @@ -47973,6 +47973,310 @@ "value": " on koontinäytössäsi. Avaa koontinäyttö." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Toiminnoittain" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Malleittain" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Ei tokeneita tällä aikavälillä" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Syöte" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tekoälytokenit päivittäin" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Tuloste" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Syöte- ja tulostetokenit kaikista tekoälypalveluista" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokenit päivittäin" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Yhteensä" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Välimuistista" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Toiminto" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Syöte" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Malli" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Mallit" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Tuloste" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Pyynnöt" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Osuus" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Yhteensä" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Käyttö" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Ei tekoälyn käyttöä tällä aikavälillä." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Suositukset ja haku" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metatietojen kääntäminen" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Tekstitysten kääntäminen" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Tekstitysten litterointi" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Muut" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "ääntä " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Toiminnoittain" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Litteroitu ääni" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Puhemallit mittaavat äänen pituutta, eivät tokeneita" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Pyynnöt" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "keskimäärin " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " päivässä" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "syöte " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · tuloste " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Käytetyin malli" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "osuus tokeneista " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · palvelu " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokenit yhteensä" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "ääntä " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Paikallinen" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Välimuistista haettu syöte sisältyy syötteeseen. Päättelytokenit sisältyvät tulosteeseen." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Poistettu palvelu" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Malleittain" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokenia" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Tekoälyn käyttöä on laskettu alkaen " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Aiempia pyyntöjä ei tallennettu." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49911,6 +50215,12 @@ "value": "Toisto" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Tekoälyn käyttö" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/fr.json b/web/src/locales/fr.json index 6fe65d662e0..29df5a2d2ea 100644 --- a/web/src/locales/fr.json +++ b/web/src/locales/fr.json @@ -53436,6 +53436,302 @@ "value": " » est sur votre tableau de bord. Ouvrir le tableau de bord." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Par fonctionnalité" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Par modèle" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Aucun jeton sur cette période" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Entrée" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Jetons d’IA par jour" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Sortie" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Jetons d’entrée et de sortie pour l’ensemble des fournisseurs d’IA" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Jetons par jour" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "En cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Fonctionnalité" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Entrée" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modèle" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modèles" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Sortie" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Demandes" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Part" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Utilisation" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Aucune utilisation de l’IA sur cette période." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recommandations et recherche" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Traduction des métadonnées" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Traduction des sous-titres" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transcription des sous-titres" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Autres" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " d’audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Par fonctionnalité" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio transcrit" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Les modèles vocaux comptabilisent la durée audio, pas les jetons" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Demandes" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " par jour en moyenne" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " en entrée · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " en sortie" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Modèle le plus utilisé" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " des jetons · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total des jetons" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " d’audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Les entrées en cache sont incluses dans l’entrée. Les jetons de raisonnement sont inclus dans la sortie." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Fournisseur supprimé" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Par modèle" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " jetons" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "L’utilisation de l’IA est comptabilisée depuis le " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Les demandes antérieures n’ont pas été enregistrées." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55636,6 +55932,12 @@ "value": "Lecture" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Utilisation de l’IA" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/he.json b/web/src/locales/he.json index 372c58517d2..b367f69f007 100644 --- a/web/src/locales/he.json +++ b/web/src/locales/he.json @@ -52983,6 +52983,310 @@ "value": " נמצא בלוח הבקרה שלך. פתיחת לוח הבקרה." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "לפי תכונה" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "לפי מודל" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "אין tokens בטווח הזה" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "קלט" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "מספר tokens של AI ליום" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "פלט" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "tokens של קלט ופלט בכל ספקי ה-AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "מספר tokens ליום" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "סה״כ" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "במטמון" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "תכונה" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "קלט" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "מודל" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "מודלים" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "פלט" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "בקשות" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "חלק" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "סה״כ" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "שימוש" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "אין שימוש ב-AI בטווח הזה." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "המלצות וחיפוש" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "תרגום מטא-נתונים" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "תרגום כתוביות" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "תמלול כתוביות" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "אחר" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "שמע באורך " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "לפי תכונה" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "שמע שתומלל" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "מודלים של דיבור מודדים אורך שמע ולא tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "בקשות" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "בממוצע " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " ליום" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "קלט: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · פלט: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "המודל שבשימוש הרב ביותר" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "חלק מה-tokens: " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · ספק: " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "סך ה-tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "שמע באורך " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "מקומי" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "קלט שנשמר במטמון נכלל בקלט. ה-tokens של החשיבה נכללים בפלט." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "ספק שהוסר" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "לפי מודל" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "השימוש ב-AI נספר החל מתאריך " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". בקשות מוקדמות יותר לא נרשמו." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55142,6 +55446,12 @@ "value": "הפעלה" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "שימוש ב-AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/hi.json b/web/src/locales/hi.json index dc89022f357..997e8c6056d 100644 --- a/web/src/locales/hi.json +++ b/web/src/locales/hi.json @@ -47613,6 +47613,306 @@ "value": " आपके डैशबोर्ड पर है। डैशबोर्ड खोलें।" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "फ़ीचर के अनुसार" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "मॉडल के अनुसार" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "इस अवधि में कोई टोकन नहीं" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "इनपुट" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "हर दिन AI टोकन" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "आउटपुट" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "सभी AI प्रोवाइडर के इनपुट और आउटपुट टोकन" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "हर दिन टोकन" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "कुल" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "कैश किया गया" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "फ़ीचर" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "इनपुट" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "मॉडल" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "मॉडल" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "आउटपुट" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "अनुरोध" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "हिस्सा" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "कुल" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "इस्तेमाल" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "इस अवधि में AI का कोई इस्तेमाल नहीं हुआ।" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "सुझाव और खोज" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "मेटाडेटा अनुवाद" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "सबटाइटल अनुवाद" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "सबटाइटल ट्रांसक्रिप्शन" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "अन्य" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ऑडियो" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "फ़ीचर के अनुसार" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "ट्रांसक्राइब किया गया ऑडियो" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "स्पीच मॉडल टोकन नहीं, ऑडियो गिनते हैं" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "अनुरोध" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "औसतन हर दिन " + }, + { + "type": 1, + "value": "count" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " इनपुट · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " आउटपुट" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "सबसे ज़्यादा इस्तेमाल किया गया मॉडल" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "टोकन का " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "कुल टोकन" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ऑडियो" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "लोकल" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "कैश किया गया इनपुट, इनपुट में शामिल है। रीज़निंग टोकन, आउटपुट में शामिल हैं।" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "हटाया गया प्रोवाइडर" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "मॉडल के अनुसार" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " टोकन" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI का इस्तेमाल " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": " से गिना जा रहा है। इससे पहले के अनुरोध दर्ज नहीं किए गए।" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49543,6 +49843,12 @@ "value": "प्लेबैक" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI इस्तेमाल" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/hr.json b/web/src/locales/hr.json index b782fe8bca0..878bf645e65 100644 --- a/web/src/locales/hr.json +++ b/web/src/locales/hr.json @@ -53692,6 +53692,306 @@ "value": " nalazi se na vašoj nadzornoj ploči. Otvorite nadzornu ploču." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Po značajki" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Po modelu" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "U ovom razdoblju nema tokena" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Ulaz" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI tokeni po danu" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Izlaz" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Ulazni i izlazni tokeni kod svih AI pružatelja" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokeni po danu" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Ukupno" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Iz predmemorije" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Značajka" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Ulaz" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeli" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Izlaz" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Zahtjevi" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Udio" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Ukupno" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Potrošnja" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "U ovom razdoblju nema korištenja AI-ja." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Preporuke i pretraživanje" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Prijevod metapodataka" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Prijevod titlova" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkripcija titlova" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Ostalo" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " zvuka" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Po značajki" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkribirani zvuk" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Govorni modeli broje trajanje zvuka, a ne tokene" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Zahtjevi" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Prosječno " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " dnevno" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Ulaz: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · izlaz: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Najkorišteniji model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " tokena · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Ukupno tokena" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " zvuka" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokalno" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Ulaz iz predmemorije dio je ulaza. Tokeni rasuđivanja dio su izlaza." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Uklonjeni pružatelj" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Po modelu" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Tokeni: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Korištenje AI-ja broji se od " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Raniji zahtjevi nisu zabilježeni." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55892,6 +56192,12 @@ "value": "Reprodukcija" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Korištenje AI-ja" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/hu.json b/web/src/locales/hu.json index 059c7571e25..00484bb449e 100644 --- a/web/src/locales/hu.json +++ b/web/src/locales/hu.json @@ -47797,6 +47797,306 @@ "value": ". Irányítópult megnyitása." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Funkciónként" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Modellenként" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Ebben az időszakban nincsenek tokenek" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Bemenet" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "MI-tokenek naponta" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Kimenet" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Bemeneti és kimeneti tokenek az összes MI-szolgáltatónál" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokenek naponta" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Összesen" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Gyorsítótárazott" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkció" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Bemenet" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modell" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modellek" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Kimenet" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Kérések" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Arány" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Összesen" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Használat" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Ebben az időszakban nem volt MI-használat." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Ajánlások és keresés" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metaadat-fordítás" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Feliratfordítás" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Felirat-átírás" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Egyéb" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Hanganyag: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Funkciónként" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Átírt hanganyag" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "A beszédmodellek a hanganyag hosszát mérik, nem a tokeneket" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Kérések" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Átlagosan napi " + }, + { + "type": 1, + "value": "count" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " bemenet · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " kimenet" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Leggyakrabban használt modell" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "Tokenarány: " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Összes token" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Hanganyag: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Helyi" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "A gyorsítótárazott bemenet a bemenet része. Az érvelési tokenek a kimenet részei." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Eltávolított szolgáltató" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Modellenként" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Az MI-használat számlálásának kezdete: " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". A korábbi kérések nem lettek rögzítve." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49739,6 +50039,12 @@ "value": "Lejátszás" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "MI-használat" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/id.json b/web/src/locales/id.json index 250d0862ea2..20a12c74784 100644 --- a/web/src/locales/id.json +++ b/web/src/locales/id.json @@ -42457,6 +42457,306 @@ "value": " ada di dasbor Anda. Buka dasbor." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Per fitur" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Per model" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Tidak ada token dalam periode ini" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Token AI per hari" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Token input dan output di semua penyedia AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Token per hari" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Dari cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Fitur" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Permintaan" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Porsi" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Penggunaan" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Tidak ada penggunaan AI dalam periode ini." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Rekomendasi & pencarian" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Terjemahan metadata" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Terjemahan subtitel" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkripsi subtitel" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Lainnya" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Per fitur" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio ditranskripsi" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Model ucapan menghitung audio, bukan token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Permintaan" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Rata-rata " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " per hari" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " masuk · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " keluar" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Model paling banyak digunakan" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " dari token · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total token" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokal" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Input dari cache termasuk dalam input. Token penalaran termasuk dalam output." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Penyedia dihapus" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Per model" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Penggunaan AI dihitung sejak " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Permintaan sebelumnya tidak tercatat." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44129,6 +44429,12 @@ "value": "Pemutaran" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Penggunaan AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/it.json b/web/src/locales/it.json index cb8e634b97e..223e6816e55 100644 --- a/web/src/locales/it.json +++ b/web/src/locales/it.json @@ -53456,6 +53456,306 @@ "value": " è nella tua dashboard. Apri la dashboard." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Per funzionalità" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Per modello" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Nessun token in questo periodo" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Token IA al giorno" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Token di input e output di tutti i provider IA" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Token al giorno" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Totale" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "In cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funzionalità" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modello" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modelli" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Richieste" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Quota" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Totale" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Utilizzo" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Nessun utilizzo dell’IA in questo periodo." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Consigli e ricerca" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Traduzione dei metadati" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Traduzione dei sottotitoli" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Trascrizione dei sottotitoli" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Altro" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " di audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Per funzionalità" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio trascritto" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "I modelli vocali conteggiano l’audio, non i token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Richieste" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "In media " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " al giorno" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " in input · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " in output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Modello più usato" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " dei token · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Token totali" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " di audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Locale" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "L’input in cache fa parte dell’input. I token di ragionamento fanno parte dell’output." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Provider rimosso" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Per modello" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "L’utilizzo dell’IA viene conteggiato dal " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Le richieste precedenti non sono state registrate." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55668,6 +55968,12 @@ "value": "Riproduzione" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Utilizzo IA" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/ja.json b/web/src/locales/ja.json index 3a1e5de0945..85d301440b0 100644 --- a/web/src/locales/ja.json +++ b/web/src/locales/ja.json @@ -42533,6 +42533,310 @@ "value": "はダッシュボードにあります。ダッシュボードを開きます。" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "機能別" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "モデル別" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "この期間のトークンはありません" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "入力" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "1日あたりのAIトークン数" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "出力" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "すべてのAIプロバイダーの入力トークンと出力トークン" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "1日あたりのトークン数" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "合計" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "キャッシュ" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "機能" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "入力" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "モデル" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "モデル" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "出力" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "リクエスト数" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "割合" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "合計" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "使用量" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "この期間のAI使用量はありません。" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "おすすめと検索" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "メタデータの翻訳" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "字幕の翻訳" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "字幕の文字起こし" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "その他" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "音声" + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "機能別" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "文字起こしした音声" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "音声モデルはトークンではなく音声の長さで計測します" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "リクエスト数" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "1日平均" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": "件" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "入力" + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · 出力" + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "最も使用されたモデル" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "トークンの" + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "トークン合計" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "音声" + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "ローカル" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "キャッシュされた入力は入力に含まれます。推論トークンは出力に含まれます。" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "削除されたプロバイダー" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "モデル別" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": "トークン" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI使用量は" + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": "から集計しています。それ以前のリクエストは記録されていません。" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44221,6 +44525,12 @@ "value": "再生" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI使用量" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/keys.ts b/web/src/locales/keys.ts index e298d9ac847..21c9d07a086 100644 --- a/web/src/locales/keys.ts +++ b/web/src/locales/keys.ts @@ -1,4 +1,4 @@ -// Generated by silo-translations 2026.12.04-33caf4c from catalog/*.arb; do not edit. +// Generated by silo-translations 2026.12.04-0b3cec1 from catalog/*.arb; do not edit. export type MessageKey = | "bufferingQuality.autoLimited" @@ -4663,6 +4663,48 @@ export type MessageKey = | "web.admin.insights.addToDashboard.hint" | "web.admin.insights.addToDashboard.onDashboard" | "web.admin.insights.addToDashboard.onDashboardLabel" + | "web.admin.insights.ai.chart.byFeature" + | "web.admin.insights.ai.chart.byModel" + | "web.admin.insights.ai.chart.empty" + | "web.admin.insights.ai.chart.input" + | "web.admin.insights.ai.chart.label" + | "web.admin.insights.ai.chart.output" + | "web.admin.insights.ai.chart.subtitle" + | "web.admin.insights.ai.chart.title" + | "web.admin.insights.ai.chart.total" + | "web.admin.insights.ai.column.cached" + | "web.admin.insights.ai.column.feature" + | "web.admin.insights.ai.column.input" + | "web.admin.insights.ai.column.model" + | "web.admin.insights.ai.column.models" + | "web.admin.insights.ai.column.output" + | "web.admin.insights.ai.column.requests" + | "web.admin.insights.ai.column.share" + | "web.admin.insights.ai.column.total" + | "web.admin.insights.ai.column.usage" + | "web.admin.insights.ai.empty" + | "web.admin.insights.ai.feature.embeddings" + | "web.admin.insights.ai.feature.metadataTranslation" + | "web.admin.insights.ai.feature.subtitleTranslation" + | "web.admin.insights.ai.feature.transcription" + | "web.admin.insights.ai.feature.unattributed" + | "web.admin.insights.ai.features.audio" + | "web.admin.insights.ai.features.title" + | "web.admin.insights.ai.kpi.audio" + | "web.admin.insights.ai.kpi.audioDetail" + | "web.admin.insights.ai.kpi.requests" + | "web.admin.insights.ai.kpi.requestsPerDay" + | "web.admin.insights.ai.kpi.tokenSplit" + | "web.admin.insights.ai.kpi.topModel" + | "web.admin.insights.ai.kpi.topModelDetail" + | "web.admin.insights.ai.kpi.totalTokens" + | "web.admin.insights.ai.models.audio" + | "web.admin.insights.ai.models.local" + | "web.admin.insights.ai.models.note" + | "web.admin.insights.ai.models.removedProvider" + | "web.admin.insights.ai.models.title" + | "web.admin.insights.ai.tokens" + | "web.admin.insights.ai.trackingSince" | "web.admin.insights.bandwidth.chart.apiServer" | "web.admin.insights.bandwidth.chart.empty" | "web.admin.insights.bandwidth.chart.metricPeak" @@ -4858,6 +4900,7 @@ export type MessageKey = | "web.admin.insights.sessionCount" | "web.admin.insights.subtitle" | "web.admin.insights.tabs.activity" + | "web.admin.insights.tabs.ai" | "web.admin.insights.tabs.bandwidth" | "web.admin.insights.tabs.devices" | "web.admin.insights.tabs.library" diff --git a/web/src/locales/ko.json b/web/src/locales/ko.json index cbcfe27642f..0a13cea9588 100644 --- a/web/src/locales/ko.json +++ b/web/src/locales/ko.json @@ -42829,6 +42829,314 @@ "value": " 차트가 대시보드에 있어요. 대시보드를 여세요." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "기능별" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "모델별" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "이 기간에 사용한 토큰이 없어요" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "입력" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "일별 AI 토큰" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "출력" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "모든 AI 제공자의 입력 및 출력 토큰" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "일별 토큰" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "전체" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "캐시됨" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "기능" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "입력" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "모델" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "모델" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "출력" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "요청" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "비율" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "전체" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "사용량" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "이 기간에 AI 사용량이 없어요." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "추천 및 검색" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "메타데이터 번역" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "자막 번역" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "음성 인식 자막" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "기타" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "오디오 " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "기능별" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "음성 인식한 오디오" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "음성 모델은 토큰이 아닌 오디오 길이로 집계해요" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "요청" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "하루 평균 " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": "회" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "입력 " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · 출력 " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "가장 많이 사용한 모델" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "토큰의 " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "총 토큰" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "오디오 " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "로컬" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "캐시된 입력은 입력에 포함돼요. 추론 토큰은 출력에 포함돼요." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "삭제된 제공자" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "모델별" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "토큰 " + }, + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": "개" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI 사용량은 " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": "부터 집계해요. 이전 요청은 기록되지 않았어요." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44557,6 +44865,12 @@ "value": "재생" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI 사용량" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/lt.json b/web/src/locales/lt.json index 1e80fe93d0c..f160ad87a93 100644 --- a/web/src/locales/lt.json +++ b/web/src/locales/lt.json @@ -59906,6 +59906,306 @@ "value": "“ yra valdymo skydelyje. Atidaryti valdymo skydelį." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Pagal funkciją" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Pagal modelį" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Šiuo laikotarpiu žetonų nėra" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Įvestis" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "DI žetonai per dieną" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Išvestis" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Visų DI teikėjų įvesties ir išvesties žetonai" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Žetonai per dieną" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Iš viso" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Iš talpyklos" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkcija" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Įvestis" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modelis" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeliai" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Išvestis" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Užklausos" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Dalis" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Iš viso" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Naudojimas" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Šiuo laikotarpiu DI naudojimo nėra." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Rekomendacijos ir paieška" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metaduomenų vertimas" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Subtitrų vertimas" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Subtitrų transkribavimas" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Kita" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " garso" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Pagal funkciją" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkribuotas garsas" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Kalbos atpažinimo modeliai skaičiuoja garso trukmę, o ne žetonus" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Užklausos" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Vidutiniškai " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " per dieną" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Įvestis: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · išvestis: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Dažniausiai naudotas modelis" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " žetonų · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Iš viso žetonų" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " garso" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Vietinis" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Įvestis iš talpyklos įskaičiuota į įvestį. Samprotavimo žetonai įskaičiuoti į išvestį." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Pašalintas teikėjas" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Pagal modelį" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Žetonų: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "DI naudojimas skaičiuojamas nuo " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Ankstesnės užklausos nebuvo įrašytos." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -62412,6 +62712,12 @@ "value": "Atkūrimas" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "DI naudojimas" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/lv.json b/web/src/locales/lv.json index f074325ca84..483fe16e7ad 100644 --- a/web/src/locales/lv.json +++ b/web/src/locales/lv.json @@ -54515,6 +54515,302 @@ "value": "” ir jūsu informācijas panelī. Atvērt informācijas paneli." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Pēc funkcijas" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Pēc modeļa" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Šajā periodā nav marķieru" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Ievade" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI marķieri dienā" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Izvade" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Visu AI nodrošinātāju ievades un izvades marķieri" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Marķieri dienā" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Kopā" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Kešatmiņā" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkcija" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Ievade" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modelis" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeļi" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Izvade" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Pieprasījumi" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Daļa" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Kopā" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Lietojums" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Šajā periodā nav AI lietojuma." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Ieteikumi un meklēšana" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metadatu tulkošana" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Subtitru tulkošana" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Subtitru transkribēšana" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Citi" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Audio: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Pēc funkcijas" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkribētais audio" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Runas modeļi uzskaita audio, nevis marķierus" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Pieprasījumi" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Vidēji dienā: " + }, + { + "type": 1, + "value": "count" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Ievade: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · izvade: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Visvairāk izmantotais modelis" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " marķieru · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Marķieri kopā" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Audio: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokāls" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Kešatmiņā saglabātā ievade ir daļa no ievades. Spriešanas marķieri ir daļa no izvades." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Noņemts nodrošinātājs" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Pēc modeļa" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Marķieri: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI lietojuma uzskaites sākums: " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Agrākie pieprasījumi netika reģistrēti." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -56747,6 +57043,12 @@ "value": "Atskaņošana" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI lietojums" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/ms.json b/web/src/locales/ms.json index bfa8e28cb41..71fb1bdd016 100644 --- a/web/src/locales/ms.json +++ b/web/src/locales/ms.json @@ -42445,6 +42445,306 @@ "value": " ada di papan pemuka anda. Buka papan pemuka." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Mengikut ciri" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Mengikut model" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Tiada token dalam tempoh ini" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Token AI setiap hari" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Token input dan output merentasi setiap pembekal AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Token setiap hari" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Jumlah" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Dalam cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Ciri" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Input" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Output" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Permintaan" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Bahagian" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Jumlah" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Penggunaan" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Tiada penggunaan AI dalam tempoh ini." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Cadangan & carian" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Terjemahan metadata" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Terjemahan sari kata" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkripsi sari kata" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Lain-lain" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Mengikut ciri" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio ditranskripsi" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Model pertuturan mengira audio, bukan token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Permintaan" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Purata " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " setiap hari" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " masuk · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " keluar" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Model paling banyak digunakan" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " daripada token · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Jumlah token" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Tempatan" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Input dalam cache ialah sebahagian daripada input. Token penaakulan ialah sebahagian daripada output." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Pembekal dialih keluar" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Mengikut model" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Penggunaan AI dikira dari " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Permintaan sebelum itu tidak direkodkan." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44117,6 +44417,12 @@ "value": "Main balik" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Penggunaan AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/nb.json b/web/src/locales/nb.json index 81255fb2fb1..1bed72661bb 100644 --- a/web/src/locales/nb.json +++ b/web/src/locales/nb.json @@ -48025,6 +48025,302 @@ "value": " er på dashbordet ditt. Åpne dashbordet." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Per funksjon" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Per modell" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Ingen tokener i denne perioden" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Inndata" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI-tokener per dag" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Utdata" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Inndata- og utdatatokener for alle AI-leverandører" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokener per dag" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Totalt" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Bufret" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funksjon" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Inndata" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modell" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeller" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Utdata" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Forespørsler" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Andel" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Totalt" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Bruk" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Ingen AI-bruk i denne perioden." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Anbefalinger og søk" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Oversettelse av metadata" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Oversettelse av undertekster" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkribering av undertekster" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Annet" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " lyd" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Per funksjon" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkribert lyd" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Talemodeller teller lyd, ikke tokener" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Forespørsler" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " per dag i snitt" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " inn · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " ut" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Mest brukte modell" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " av tokenene · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokener totalt" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " lyd" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokal" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Bufret inndata er en del av inndata. Resonneringstokener er en del av utdata." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Fjernet leverandør" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Per modell" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokener" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI-bruk telles fra " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Tidligere forespørsler ble ikke registrert." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49967,6 +50263,12 @@ "value": "Avspilling" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI-bruk" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/nl.json b/web/src/locales/nl.json index 701862d2329..81f2050f1e5 100644 --- a/web/src/locales/nl.json +++ b/web/src/locales/nl.json @@ -47697,6 +47697,306 @@ "value": " staat op je dashboard. Dashboard openen." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Per functie" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Per model" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Geen tokens in deze periode" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Invoer" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI-tokens per dag" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Uitvoer" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Invoer- en uitvoertokens van alle AI-providers" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens per dag" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Totaal" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Gecachet" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Functie" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Invoer" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modellen" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Uitvoer" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Aanvragen" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Aandeel" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Totaal" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Gebruik" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Geen AI-gebruik in deze periode." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Aanbevelingen en zoeken" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Metadatavertaling" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Ondertitelvertaling" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Ondertiteltranscriptie" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Overig" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " audio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Per functie" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Getranscribeerde audio" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Spraakmodellen tellen audio, geen tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Aanvragen" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Gemiddeld " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " per dag" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " in · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " uit" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Meest gebruikt model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " van de tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Totaal aantal tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " audio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokaal" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Gecachete invoer valt onder invoer. Redeneertokens vallen onder uitvoer." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Verwijderde provider" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Per model" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI-gebruik wordt geteld vanaf " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Eerdere aanvragen zijn niet vastgelegd." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49651,6 +49951,12 @@ "value": "Afspelen" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI-gebruik" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/pl.json b/web/src/locales/pl.json index 051c463dd03..22807a41bb9 100644 --- a/web/src/locales/pl.json +++ b/web/src/locales/pl.json @@ -59913,6 +59913,306 @@ "value": " jest na pulpicie. Otwórz pulpit." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Według funkcji" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Według modelu" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Brak tokenów w tym okresie" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Wejście" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokeny AI dziennie" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Wyjście" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokeny wejściowe i wyjściowe u wszystkich dostawców AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokeny dziennie" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Łącznie" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Z cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkcja" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Wejście" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modele" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Wyjście" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Żądania" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Udział" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Łącznie" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Użycie" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Brak użycia AI w tym okresie." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Rekomendacje i wyszukiwanie" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Tłumaczenie metadanych" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Tłumaczenie napisów" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkrypcja napisów" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Inne" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Dźwięk: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Według funkcji" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkrybowany dźwięk" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Modele mowy liczą dźwięk, nie tokeny" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Żądania" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Średnio " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " dziennie" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Wejście: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · wyjście: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Najczęściej używany model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " tokenów · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokeny łącznie" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Dźwięk: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokalny" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Wejście z cache jest częścią wejścia. Tokeny rozumowania są częścią wyjścia." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Usunięty dostawca" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Według modelu" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Tokeny: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Użycie AI jest liczone od dnia " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Wcześniejsze żądania nie zostały zarejestrowane." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -62403,6 +62703,12 @@ "value": "Odtwarzanie" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Użycie AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/pt-BR.json b/web/src/locales/pt-BR.json index 1352313ff52..4550a7b1006 100644 --- a/web/src/locales/pt-BR.json +++ b/web/src/locales/pt-BR.json @@ -53744,6 +53744,302 @@ "value": " está no seu painel. Abrir o painel." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Por recurso" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Por modelo" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Nenhum token neste período" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokens de IA por dia" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Saída" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokens de entrada e saída em todos os provedores de IA" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens por dia" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Em cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Recurso" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modelo" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modelos" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Saída" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Solicitações" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Proporção" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Uso" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Nenhum uso de IA neste período." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recomendações e pesquisa" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Tradução de metadados" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Tradução de legendas" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transcrição de legendas" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Outros" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " de áudio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Por recurso" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Áudio transcrito" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Modelos de fala contabilizam áudio, não tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Solicitações" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " por dia em média" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " de entrada · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " de saída" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Modelo mais usado" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " dos tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total de tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " de áudio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "A entrada em cache faz parte da entrada. Os tokens de raciocínio fazem parte da saída." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Provedor removido" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Por modelo" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "O uso de IA é contabilizado desde " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Solicitações anteriores não foram registradas." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55956,6 +56252,12 @@ "value": "Reprodução" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Uso de IA" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/pt-PT.json b/web/src/locales/pt-PT.json index 294c80ce592..d6bbee38bd6 100644 --- a/web/src/locales/pt-PT.json +++ b/web/src/locales/pt-PT.json @@ -53840,6 +53840,302 @@ "value": " está no seu painel. Abrir o painel." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Por funcionalidade" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Por modelo" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Nenhum token neste período" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokens de IA por dia" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Saída" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokens de entrada e de saída de todos os fornecedores de IA" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens por dia" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Em cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funcionalidade" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Entrada" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modelo" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modelos" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Saída" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Pedidos" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Proporção" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Utilização" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Nenhuma utilização de IA neste período." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recomendações e pesquisa" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Tradução de metadados" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Tradução de legendas" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transcrição de legendas" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Outros" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " de áudio" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Por funcionalidade" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Áudio transcrito" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Os modelos de voz contabilizam áudio, não tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Pedidos" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " por dia, em média" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " de entrada · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " de saída" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Modelo mais utilizado" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " dos tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total de tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " de áudio" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "A entrada em cache faz parte da entrada. Os tokens de raciocínio fazem parte da saída." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Fornecedor removido" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Por modelo" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "A utilização de IA é contabilizada desde " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Os pedidos anteriores não foram registados." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -56040,6 +56336,12 @@ "value": "Reprodução" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Utilização de IA" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/ro.json b/web/src/locales/ro.json index 1223ea25543..00b4f1bcfde 100644 --- a/web/src/locales/ro.json +++ b/web/src/locales/ro.json @@ -53628,6 +53628,306 @@ "value": " este pe tabloul de bord. Deschideți tabloul de bord." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Pe funcționalități" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Pe modele" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Niciun token în această perioadă" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Intrare" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokenuri AI pe zi" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Ieșire" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokenurile de intrare și de ieșire de la toți furnizorii AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokenuri pe zi" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Din cache" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funcționalitate" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Intrare" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modele" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Ieșire" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Cereri" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Pondere" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Total" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Utilizare" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Nicio utilizare AI în această perioadă." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Recomandări și căutare" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Traducerea metadatelor" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Traducerea subtitrărilor" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transcrierea subtitrărilor" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Altele" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Audio: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Pe funcționalități" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Audio transcris" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Modelele de vorbire contorizează durata audio, nu tokenuri" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Cereri" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "În medie, " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " pe zi" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Intrare: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · Ieșire: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Cel mai folosit model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " din tokenuri · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Total tokenuri" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Audio: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Local" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Tokenurile de intrare din cache sunt incluse în intrare. Tokenurile de raționament sunt incluse în ieșire." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Furnizor eliminat" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Pe modele" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Tokenuri: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Utilizarea AI este contorizată începând cu " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Cererile anterioare nu au fost înregistrate." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -55832,6 +56132,12 @@ "value": "Redare" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Utilizare AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/ru.json b/web/src/locales/ru.json index 4a3d0eb23d7..1987df72150 100644 --- a/web/src/locales/ru.json +++ b/web/src/locales/ru.json @@ -60120,6 +60120,306 @@ "value": "» уже на вашей панели управления. Открыть панель управления." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "По функциям" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "По моделям" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Нет токенов за этот период" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Вход" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Токены ИИ по дням" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Выход" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Входные и выходные токены по всем провайдерам ИИ" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Токены по дням" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Всего" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Из кеша" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Функция" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Вход" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Модель" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Модели" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Выход" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Запросы" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Доля" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Всего" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Использование" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Нет использования ИИ за этот период." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Рекомендации и поиск" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Перевод метаданных" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Перевод субтитров" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Транскрипция субтитров" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Другое" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Аудио: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "По функциям" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Транскрибировано аудио" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Речевые модели учитывают длительность аудио, а не токены" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Запросы" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "В среднем в день: " + }, + { + "type": 1, + "value": "count" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Вход: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · выход: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Самая используемая модель" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "Доля токенов: " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Всего токенов" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Аудио: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Локальная" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Кешированные входные токены входят во входные. Токены рассуждений входят в выходные." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Провайдер удалён" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "По моделям" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Токенов: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Использование ИИ учитывается с " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Более ранние запросы не записывались." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -62610,6 +62910,12 @@ "value": "Воспроизведение" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Использование ИИ" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/sk.json b/web/src/locales/sk.json index fa8a98e8fc0..2a74d27f493 100644 --- a/web/src/locales/sk.json +++ b/web/src/locales/sk.json @@ -59403,6 +59403,306 @@ "value": " je na vašej nástenke. Otvoriť nástenku." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Podľa funkcie" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Podľa modelu" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "V tomto období žiadne tokeny" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Vstup" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI tokeny za deň" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Výstup" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Vstupné a výstupné tokeny naprieč všetkými poskytovateľmi AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokeny za deň" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Celkom" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Z vyrovnávacej pamäte" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkcia" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Vstup" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modely" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Výstup" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Požiadavky" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Podiel" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Celkom" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Využitie" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "V tomto období žiadne využitie AI." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Odporúčania a vyhľadávanie" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Preklad metadát" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Preklad titulkov" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Prepis titulkov" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Iné" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Zvuk: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Podľa funkcie" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Prepísaný zvuk" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Rečové modely počítajú zvuk, nie tokeny" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Požiadavky" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "V priemere " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " za deň" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Vstup: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · Výstup: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Najpoužívanejší model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " tokenov · poskytovateľ " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokeny celkom" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Zvuk: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokálny" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Vstup z vyrovnávacej pamäte je súčasťou vstupu. Tokeny uvažovania sú súčasťou výstupu." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Odstránený poskytovateľ" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Podľa modelu" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Tokeny: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Využitie AI sa počíta od " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Skoršie požiadavky sa nezaznamenali." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -61873,6 +62173,12 @@ "value": "Prehrávanie" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Využitie AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/sl.json b/web/src/locales/sl.json index 7f4fd95d054..90523603c42 100644 --- a/web/src/locales/sl.json +++ b/web/src/locales/sl.json @@ -59170,6 +59170,306 @@ "value": " je na vaši nadzorni plošči. Odprite nadzorno ploščo." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Po funkcijah" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Po modelih" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "V tem obdobju ni tokenov" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Vhod" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Tokeni AI na dan" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Izhod" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Vhodni in izhodni tokeni pri vseh ponudnikih AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokeni na dan" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Skupaj" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Predpomnjeno" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funkcija" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Vhod" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeli" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Izhod" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Zahteve" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Delež" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Skupaj" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Poraba" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "V tem obdobju ni porabe AI." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Priporočila in iskanje" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Prevajanje metapodatkov" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Prevajanje podnapisov" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Prepisovanje podnapisov" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Drugo" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "Zvok: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Po funkcijah" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Prepisani zvok" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Govorni modeli namesto tokenov štejejo zvok" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Zahteve" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Povprečno na dan: " + }, + { + "type": 1, + "value": "count" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Vhod: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · izhod: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Najpogosteje uporabljen model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "Delež tokenov: " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tokeni skupaj" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "Zvok: " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokalno" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Predpomnjeni vhod je del vhoda. Tokeni za sklepanje so del izhoda." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Odstranjen ponudnik" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Po modelih" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 0, + "value": "Tokeni: " + }, + { + "type": 1, + "value": "value" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Poraba AI se šteje od " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Prejšnje zahteve niso bile zabeležene." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -61640,6 +61940,12 @@ "value": "Predvajanje" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Poraba AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/sv.json b/web/src/locales/sv.json index 5981486eb11..98ffc253626 100644 --- a/web/src/locales/sv.json +++ b/web/src/locales/sv.json @@ -47917,6 +47917,302 @@ "value": " finns på din instrumentpanel. Öppna instrumentpanelen." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Per funktion" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Per modell" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Inga tokens under den här perioden" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Indata" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "AI-tokens per dag" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Utdata" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tokens för indata och utdata från alla AI-leverantörer" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Tokens per dag" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Totalt" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Cachad" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Funktion" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Indata" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Modell" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeller" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Utdata" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Förfrågningar" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Andel" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Totalt" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Användning" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Ingen AI-användning under den här perioden." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Rekommendationer och sökning" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Översättning av metadata" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Undertextöversättning" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Transkribering till undertexter" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Övrigt" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ljud" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Per funktion" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Transkriberat ljud" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Talmodeller räknar ljud, inte tokens" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Förfrågningar" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " per dag i genomsnitt" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " in · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " ut" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Mest använda modell" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " av alla tokens · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Totalt antal tokens" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ljud" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Lokal" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Cachad indata ingår i indata. Resonemangstokens ingår i utdata." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Borttagen leverantör" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Per modell" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " tokens" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI-användning räknas från och med " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Tidigare förfrågningar registrerades inte." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49859,6 +50155,12 @@ "value": "Uppspelning" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI-användning" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/th.json b/web/src/locales/th.json index 850de8f96a6..38f2a9eca49 100644 --- a/web/src/locales/th.json +++ b/web/src/locales/th.json @@ -43277,6 +43277,306 @@ "value": " อยู่ในแดชบอร์ดของคุณแล้ว เปิดแดชบอร์ด" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "ตามฟีเจอร์" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "ตามโมเดล" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "ไม่มีโทเค็นในช่วงเวลานี้" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "อินพุต" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "โทเค็น AI ต่อวัน" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "เอาต์พุต" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "โทเค็นอินพุตและเอาต์พุตจากผู้ให้บริการ AI ทั้งหมด" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "โทเค็นต่อวัน" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "ทั้งหมด" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "จากแคช" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "ฟีเจอร์" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "อินพุต" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "โมเดล" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "โมเดล" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "เอาต์พุต" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "คำขอ" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "สัดส่วน" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "ทั้งหมด" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "การใช้งาน" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "ไม่มีการใช้งาน AI ในช่วงเวลานี้" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "คำแนะนำและการค้นหา" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "การแปลข้อมูลเมตา" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "การแปลคำบรรยาย" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "การถอดเสียงเป็นคำบรรยาย" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "อื่น ๆ" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 0, + "value": "เสียงความยาว " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "ตามฟีเจอร์" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "เสียงที่ถอดความแล้ว" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "โมเดลเสียงพูดนับความยาวเสียง ไม่ใช่โทเค็น" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "คำขอ" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "เฉลี่ย " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " คำขอต่อวัน" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "อินพุต " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · เอาต์พุต " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "โมเดลที่ใช้มากที่สุด" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " ของโทเค็น · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "โทเค็นทั้งหมด" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 0, + "value": "เสียงความยาว " + }, + { + "type": 1, + "value": "duration" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "ภายในเครื่อง" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "อินพุตจากแคชรวมอยู่ในอินพุต โทเค็นการให้เหตุผลรวมอยู่ในเอาต์พุต" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "ผู้ให้บริการที่นำออกแล้ว" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "ตามโมเดล" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " โทเค็น" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "นับการใช้งาน AI ตั้งแต่ " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": " ไม่ได้บันทึกคำขอก่อนหน้านั้น" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44961,6 +45261,12 @@ "value": "การเล่น" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "การใช้งาน AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/tr.json b/web/src/locales/tr.json index b32006c0be3..33ea3fc6481 100644 --- a/web/src/locales/tr.json +++ b/web/src/locales/tr.json @@ -47441,6 +47441,306 @@ "value": " grafiği panonuzda. Panoyu açın." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Özelliğe göre" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Modele göre" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Bu aralıkta token yok" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Giriş" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Günlük yapay zekâ token sayısı" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Çıkış" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Tüm yapay zekâ sağlayıcılarındaki giriş ve çıkış tokenları" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Günlük token" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Toplam" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Önbellekte" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Özellik" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Giriş" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Model" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Modeller" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Çıkış" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "İstekler" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Pay" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Toplam" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Kullanım" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Bu aralıkta yapay zekâ kullanımı yok." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Öneriler ve arama" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Meta veri çevirisi" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Altyazı çevirisi" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Altyazı transkripsiyonu" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Diğer" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ses" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Özelliğe göre" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Yazıya dökülen ses" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Konuşma modelleri token değil, ses süresi sayar" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "İstekler" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Günde ortalama " + }, + { + "type": 1, + "value": "count" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " giriş · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " çıkış" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "En çok kullanılan model" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "Token payı: " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Toplam token" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " ses" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Yerel" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Önbellekteki giriş, girişe dahildir. Akıl yürütme tokenları çıkışa dahildir." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Kaldırılan sağlayıcı" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Modele göre" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Yapay zekâ kullanımı şu tarihten itibaren sayılıyor: " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Daha önceki istekler kaydedilmedi." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -49399,6 +49699,12 @@ "value": "Oynatma" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Yapay zekâ kullanımı" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/uk.json b/web/src/locales/uk.json index ef75232c836..6cf8231ea63 100644 --- a/web/src/locales/uk.json +++ b/web/src/locales/uk.json @@ -59166,6 +59166,306 @@ "value": " є на вашій панелі. Відкрити панель." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "За функціями" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "За моделями" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "За цей період токенів немає" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Вхідні" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Токени ШІ за день" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Вихідні" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Вхідні й вихідні токени в усіх постачальників ШІ" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Токени за день" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Усього" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Кешовані" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Функція" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Вхідні" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Модель" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Моделі" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Вихідні" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Запити" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Частка" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Усього" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Використання" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "За цей період ШІ не використовувався." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Рекомендації й пошук" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Переклад метаданих" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Переклад субтитрів" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Транскрибування субтитрів" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Інше" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " аудіо" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "За функціями" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Транскрибовано аудіо" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Моделі мовлення обліковують тривалість аудіо, а не токени" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Запити" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "У середньому " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " на день" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "Вхідні: " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · вихідні: " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Найчастіше використовувана модель" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " токенів · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Усього токенів" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " аудіо" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Локальна" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Кешовані вхідні токени входять до вхідних. Токени міркувань входять до вихідних." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Видалений постачальник" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "За моделями" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " токенів" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Використання ШІ враховується з " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Попередні запити не записано." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -61652,6 +61952,12 @@ "value": "Відтворення" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Використання ШІ" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/vi.json b/web/src/locales/vi.json index 86ddeca097c..e2c0629480b 100644 --- a/web/src/locales/vi.json +++ b/web/src/locales/vi.json @@ -48113,6 +48113,306 @@ "value": " đã có trên bảng điều khiển của bạn. Mở bảng điều khiển." } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "Theo tính năng" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "Theo mô hình" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "Không có token nào trong khoảng thời gian này" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "Đầu vào" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "Token AI mỗi ngày" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "Đầu ra" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "Token đầu vào và đầu ra trên tất cả nhà cung cấp AI" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "Token mỗi ngày" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "Tổng" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "Đã lưu bộ nhớ đệm" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "Tính năng" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "Đầu vào" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "Mô hình" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "Mô hình" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "Đầu ra" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "Yêu cầu" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "Tỷ lệ" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "Tổng" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "Mức sử dụng" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "Không có lượt sử dụng AI nào trong khoảng thời gian này." + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "Đề xuất và tìm kiếm" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "Dịch siêu dữ liệu" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "Dịch phụ đề" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "Chép lời thành phụ đề" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "Khác" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " âm thanh" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "Theo tính năng" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "Âm thanh đã chép lời" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "Mô hình giọng nói tính theo thời lượng âm thanh, không theo token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "Yêu cầu" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "Trung bình " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " mỗi ngày" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " đầu vào · " + }, + { + "type": 1, + "value": "output" + }, + { + "type": 0, + "value": " đầu ra" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "Mô hình dùng nhiều nhất" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " số token · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Tổng số token" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " âm thanh" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "Cục bộ" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "Đầu vào đã lưu bộ nhớ đệm được tính trong đầu vào. Token suy luận được tính trong đầu ra." + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "Nhà cung cấp đã gỡ" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "Theo mô hình" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "Mức sử dụng AI được tính từ " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": ". Các yêu cầu trước đó không được ghi nhận." + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -50059,6 +50359,12 @@ "value": "Phát lại" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "Mức sử dụng AI" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/zh-Hans.json b/web/src/locales/zh-Hans.json index c90461e2e90..16c6c8c06fb 100644 --- a/web/src/locales/zh-Hans.json +++ b/web/src/locales/zh-Hans.json @@ -42801,6 +42801,310 @@ "value": "已在你的仪表板上。打开仪表板。" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "按功能" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "按模型" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "此时间范围内没有Token" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "输入" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "每日AI Token数" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "输出" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "所有AI提供商的输入和输出Token" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "每日Token数" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "总计" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "缓存" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "功能" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "输入" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "模型" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "模型" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "输出" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "请求数" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "占比" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "总计" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "用量" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "此时间范围内没有AI用量。" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "推荐和搜索" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "元数据翻译" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "字幕翻译" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "字幕转录" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "其他" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": "音频" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "按功能" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "已转录音频" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "语音模型按音频时长计量,而非Token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "请求数" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "日均" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": "次" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "输入" + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · 输出" + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "最常用模型" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "占Token的" + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Token总数" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": "音频" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "本地" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "缓存输入计入输入。推理Token计入输出。" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "已删除的提供商" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "按模型" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": "个Token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI用量自" + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": "起开始统计。更早的请求未被记录。" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44493,6 +44797,12 @@ "value": "播放" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI用量" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/locales/zh-Hant.json b/web/src/locales/zh-Hant.json index 4767c1b0b48..6818f818570 100644 --- a/web/src/locales/zh-Hant.json +++ b/web/src/locales/zh-Hant.json @@ -42927,6 +42927,310 @@ "value": " 已在你的儀表板上。開啟儀表板。" } ], + "web.admin.insights.ai.chart.byFeature": [ + { + "type": 0, + "value": "依功能" + } + ], + "web.admin.insights.ai.chart.byModel": [ + { + "type": 0, + "value": "依模型" + } + ], + "web.admin.insights.ai.chart.empty": [ + { + "type": 0, + "value": "此時段內沒有 Token 用量" + } + ], + "web.admin.insights.ai.chart.input": [ + { + "type": 0, + "value": "輸入" + } + ], + "web.admin.insights.ai.chart.label": [ + { + "type": 0, + "value": "每日 AI Token 用量" + } + ], + "web.admin.insights.ai.chart.output": [ + { + "type": 0, + "value": "輸出" + } + ], + "web.admin.insights.ai.chart.subtitle": [ + { + "type": 0, + "value": "所有 AI 提供者的輸入與輸出 Token" + } + ], + "web.admin.insights.ai.chart.title": [ + { + "type": 0, + "value": "每日 Token 用量" + } + ], + "web.admin.insights.ai.chart.total": [ + { + "type": 0, + "value": "總計" + } + ], + "web.admin.insights.ai.column.cached": [ + { + "type": 0, + "value": "已快取" + } + ], + "web.admin.insights.ai.column.feature": [ + { + "type": 0, + "value": "功能" + } + ], + "web.admin.insights.ai.column.input": [ + { + "type": 0, + "value": "輸入" + } + ], + "web.admin.insights.ai.column.model": [ + { + "type": 0, + "value": "模型" + } + ], + "web.admin.insights.ai.column.models": [ + { + "type": 0, + "value": "模型" + } + ], + "web.admin.insights.ai.column.output": [ + { + "type": 0, + "value": "輸出" + } + ], + "web.admin.insights.ai.column.requests": [ + { + "type": 0, + "value": "請求次數" + } + ], + "web.admin.insights.ai.column.share": [ + { + "type": 0, + "value": "占比" + } + ], + "web.admin.insights.ai.column.total": [ + { + "type": 0, + "value": "總計" + } + ], + "web.admin.insights.ai.column.usage": [ + { + "type": 0, + "value": "用量" + } + ], + "web.admin.insights.ai.empty": [ + { + "type": 0, + "value": "此時段內沒有 AI 用量。" + } + ], + "web.admin.insights.ai.feature.embeddings": [ + { + "type": 0, + "value": "推薦與搜尋" + } + ], + "web.admin.insights.ai.feature.metadataTranslation": [ + { + "type": 0, + "value": "中繼資料翻譯" + } + ], + "web.admin.insights.ai.feature.subtitleTranslation": [ + { + "type": 0, + "value": "字幕翻譯" + } + ], + "web.admin.insights.ai.feature.transcription": [ + { + "type": 0, + "value": "字幕轉錄" + } + ], + "web.admin.insights.ai.feature.unattributed": [ + { + "type": 0, + "value": "其他" + } + ], + "web.admin.insights.ai.features.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " 的音訊" + } + ], + "web.admin.insights.ai.features.title": [ + { + "type": 0, + "value": "依功能" + } + ], + "web.admin.insights.ai.kpi.audio": [ + { + "type": 0, + "value": "已轉錄音訊" + } + ], + "web.admin.insights.ai.kpi.audioDetail": [ + { + "type": 0, + "value": "語音模型以音訊長度計算,而非 Token" + } + ], + "web.admin.insights.ai.kpi.requests": [ + { + "type": 0, + "value": "請求次數" + } + ], + "web.admin.insights.ai.kpi.requestsPerDay": [ + { + "type": 0, + "value": "平均每日 " + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": " 次" + } + ], + "web.admin.insights.ai.kpi.tokenSplit": [ + { + "type": 0, + "value": "輸入 " + }, + { + "type": 1, + "value": "input" + }, + { + "type": 0, + "value": " · 輸出 " + }, + { + "type": 1, + "value": "output" + } + ], + "web.admin.insights.ai.kpi.topModel": [ + { + "type": 0, + "value": "最常使用的模型" + } + ], + "web.admin.insights.ai.kpi.topModelDetail": [ + { + "type": 0, + "value": "占 Token 的 " + }, + { + "type": 1, + "value": "share" + }, + { + "type": 0, + "value": " · " + }, + { + "type": 1, + "value": "provider" + } + ], + "web.admin.insights.ai.kpi.totalTokens": [ + { + "type": 0, + "value": "Token 總量" + } + ], + "web.admin.insights.ai.models.audio": [ + { + "type": 1, + "value": "duration" + }, + { + "type": 0, + "value": " 的音訊" + } + ], + "web.admin.insights.ai.models.local": [ + { + "type": 0, + "value": "本機" + } + ], + "web.admin.insights.ai.models.note": [ + { + "type": 0, + "value": "已快取的輸入包含在輸入中。推理 Token 包含在輸出中。" + } + ], + "web.admin.insights.ai.models.removedProvider": [ + { + "type": 0, + "value": "已移除的提供者" + } + ], + "web.admin.insights.ai.models.title": [ + { + "type": 0, + "value": "依模型" + } + ], + "web.admin.insights.ai.tokens": [ + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " 個 Token" + } + ], + "web.admin.insights.ai.trackingSince": [ + { + "type": 0, + "value": "AI 用量自 " + }, + { + "type": 1, + "value": "since" + }, + { + "type": 0, + "value": " 起計算。先前的請求未被記錄。" + } + ], "web.admin.insights.bandwidth.chart.apiServer": [ { "type": 0, @@ -44623,6 +44927,12 @@ "value": "播放" } ], + "web.admin.insights.tabs.ai": [ + { + "type": 0, + "value": "AI 用量" + } + ], "web.admin.insights.tabs.bandwidth": [ { "type": 0, diff --git a/web/src/pages/admin-insights/AdminInsights.tsx b/web/src/pages/admin-insights/AdminInsights.tsx index 5aaa600b89f..f28e7f3d1b6 100644 --- a/web/src/pages/admin-insights/AdminInsights.tsx +++ b/web/src/pages/admin-insights/AdminInsights.tsx @@ -24,6 +24,7 @@ import { useT } from "@/i18n"; import { cn } from "@/lib/utils"; import type { MessageKey } from "@/locales/keys"; +import { AiUsageTab } from "./AiUsageTab"; import { BandwidthTab } from "./BandwidthTab"; import { DevicesTab } from "./DevicesTab"; import { InsightsDashboardPinsProvider } from "./InsightsDashboardPins"; @@ -191,13 +192,15 @@ export default function AdminInsights() { edges: tabEdges, measure: measureTabStrip, } = useScrollStrip(`[role="tab"][data-state="active"]`, activeTab); - const showLibraryFilter = activeTab !== "bandwidth"; + // Bandwidth and AI usage are kept per UTC day for the whole server. + const utcServerTab = activeTab === "bandwidth" || activeTab === "ai"; + const showLibraryFilter = !utcServerTab; const showAccountFilter = activeTab === "playback" || activeTab === "titles" || activeTab === "library" || activeTab === "devices"; - const showTimezoneFilter = activeTab !== "bandwidth"; + const showTimezoneFilter = !utcServerTab; // The detail panels honor only the filters this tab shows: an account or // library chosen on another tab stays in the URL but is hidden here. const detailFilters = useMemo( @@ -282,6 +285,9 @@ export default function AdminInsights() { {t("web.admin.insights.tabs.bandwidth")} + + {t("web.admin.insights.tabs.ai")} + @@ -472,6 +478,9 @@ export default function AdminInsights() { {activeTab === "bandwidth" ? : null} + + {activeTab === "ai" ? : null} + = { + subtitle_translation: "web.admin.insights.ai.feature.subtitleTranslation", + metadata_translation: "web.admin.insights.ai.feature.metadataTranslation", + transcription: "web.admin.insights.ai.feature.transcription", + embeddings: "web.admin.insights.ai.feature.embeddings", + other: "web.admin.insights.ai.feature.unattributed", +}; + +/** A feature this build doesn't know yet (added by a newer server) reads as unattributed. */ +function featureLabelKey(feature: AIFeature): MessageKey { + return FEATURE_LABELS[feature] ?? FEATURE_LABELS.other; +} + +const DIRECTION_LABELS: Record = { + total: "web.admin.insights.ai.chart.total", + input: "web.admin.insights.ai.chart.input", + output: "web.admin.insights.ai.chart.output", +}; + +const SPLIT_LABELS: Record = { + model: "web.admin.insights.ai.chart.byModel", + feature: "web.admin.insights.ai.chart.byFeature", +}; + +const tokenFormatters = new Map(); + +function formatTokens(n: number): string { + const locale = formatLocale(); + let formatter = tokenFormatters.get(locale ?? ""); + if (!formatter) { + formatter = new Intl.NumberFormat(locale, { notation: "compact", maximumFractionDigits: 1 }); + tokenFormatters.set(locale ?? "", formatter); + } + return formatter.format(n); +} + +function formatCount(n: number): string { + return n.toLocaleString(formatLocale()); +} + +/** The last UTC day a report covers: `to` is now, or a custom window's exclusive end. */ +function lastReportDay(to: string): string { + return new Date(Date.parse(to) - 1).toISOString().slice(0, 10); +} + +/** Speech models report audio and no tokens; they stay out of token charts and shares. */ +function isAudioOnly(u: { total_tokens: number; audio_seconds: number }): boolean { + return u.total_tokens === 0 && u.audio_seconds > 0; +} + +function ProviderBadges({ model }: { model: AIModel }) { + const t = useT(); + return ( + <> + + {model.provider_name || t("web.admin.insights.ai.models.removedProvider")} + + {LOCAL_PROVIDER_TYPES.has(model.provider_type) ? ( + + {t("web.admin.insights.ai.models.local")} + + ) : null} + + ); +} + +export function AiUsageTab({ filters }: { filters: InsightsFilterState }) { + const t = useT(); + const [splitBy, setSplitBy] = useState("model"); + const [direction, setDirection] = useState("total"); + + const queryParams = useMemo( + () => buildInsightsWindowQueryParams(filters, { omitLibrary: true, omitUser: true }), + [filters], + ); + const query = useAdminInsightsAI(queryParams, { keepPrevious: true }); + const data = query.data; + + const chart = useMemo(() => { + if (!data || data.points.length === 0) { + return null; + } + const since = data.tracking_since ?? ""; + const windowStart = data.from.slice(0, 10); + const first = since > windowStart ? since : windowStart; + const grid = buildDailyUtcGrid(first, lastReportDay(data.to)); + const byDate = new Map(data.points.map((p) => [p.date, p])); + const makePoints = (pick: (p: AIPoint) => number): LineChartPoint[] => + grid.map((day) => { + const p = byDate.get(day); + return { t: Date.parse(`${day}T12:00:00Z`), value: p ? pick(p) : 0 }; + }); + + if (direction !== "total") { + return { + points: makePoints((p) => (direction === "input" ? p.input_tokens : p.output_tokens)), + stacks: undefined, + start: first, + }; + } + + const series = + splitBy === "model" + ? data.models + .filter((m) => m.total_tokens > 0) + .map((m) => ({ + key: m.key, + label: m.model, + pick: (p: AIPoint) => p.tokens_by_model[m.key] ?? 0, + })) + : data.features + .filter((f) => f.total_tokens > 0) + .map((f) => ({ + key: f.feature, + label: t(featureLabelKey(f.feature)), + pick: (p: AIPoint) => p.tokens_by_feature[f.feature] ?? 0, + })); + const named = series.slice(0, MAX_NAMED_BANDS); + const stacks: LineChartStack[] = named.map((s, i) => ({ + key: s.key, + label: s.label, + color: chartSeriesColor(i), + points: makePoints(s.pick), + })); + if (series.length > named.length) { + const otherPoints = makePoints((p) => + Math.max( + p.input_tokens + p.output_tokens - named.reduce((sum, s) => sum + s.pick(p), 0), + 0, + ), + ); + stacks.unshift({ + // Not "other": that is a feature's own key in the By feature view. + key: "overflow", + label: t("web.admin.dashboard.widgets.egress.otherBand"), + color: OTHER_COLOR, + points: otherPoints, + }); + } + return { + points: makePoints((p) => p.input_tokens + p.output_tokens), + stacks: stacks.length > 0 ? stacks : undefined, + start: first, + }; + }, [data, direction, splitBy, t]); + + if (query.isLoading) { + return ( +
+
+ {Array.from({ length: 4 }).map((_, i) => ( + + ))} +
+ +
+ ); + } + + if (query.error || !data) { + return ( + { + void query.refetch(); + }} + /> + ); + } + + const showTrackingBanner = + data.tracking_since !== null && Date.parse(data.from) < Date.parse(data.tracking_since); + const trackingBanner = showTrackingBanner ? ( + + ) : null; + + if (data.summary.requests === 0) { + return ( +
+ {trackingBanner} + + + + + +
+ ); + } + + const { summary } = data; + const days = chart ? chart.points.length : 0; + const topModel = data.models.find((m) => m.total_tokens > 0); + const tokenShare = (tokens: number) => + summary.total_tokens > 0 ? tokens / summary.total_tokens : 0; + + return ( +
+ {trackingBanner} + +
+ + + 0 ? formatWatchTime(summary.audio_seconds) : EM_DASH} + subtext={t("web.admin.insights.ai.kpi.audioDetail")} + /> + +
+ + + +
+ + {t("web.admin.insights.ai.chart.title")} + +

+ {t("web.admin.insights.ai.chart.subtitle")} +

+
+
+ ({ + value, + label: t(DIRECTION_LABELS[value]), + ariaLabel: t(DIRECTION_LABELS[value]), + }))} + onChange={setDirection} + /> + {direction === "total" ? ( + ({ + value, + label: t(SPLIT_LABELS[value]), + ariaLabel: t(SPLIT_LABELS[value]), + }))} + onChange={setSplitBy} + /> + ) : null} +
+
+ + {!chart || summary.total_tokens === 0 ? ( + + ) : ( + t("web.admin.insights.ai.tokens", { value: formatTokens(v) })} + formatTick={formatTokens} + formatTimestamp={(ms) => + formatShortCalendarDate(new Date(ms).toISOString().slice(0, 10)) + } + edgeLabels={{ + start: formatShortCalendarDate(chart.start), + end: formatShortCalendarDate(lastReportDay(data.to)), + }} + ariaLabel={t("web.admin.insights.ai.chart.label")} + /> + )} + +
+ + + + + {t("web.admin.insights.ai.models.title")} + + + + <> +
+ + + + {t("web.admin.insights.ai.column.model")} + + {t("web.admin.insights.ai.column.requests")} + + + {t("web.admin.insights.ai.column.input")} + + + {t("web.admin.insights.ai.column.cached")} + + + {t("web.admin.insights.ai.column.output")} + + + {t("web.admin.insights.ai.column.total")} + + + {t("web.admin.insights.ai.column.share")} + + + + + {data.models.map((m) => ( + + +
+ {m.model} + +
+
+ + {formatCount(m.requests)} + + {isAudioOnly(m) ? ( + + {t("web.admin.insights.ai.models.audio", { + duration: formatWatchTime(m.audio_seconds), + })} + + ) : ( + <> + + {formatTokens(m.input_tokens)} + + + {m.cached_input_tokens > 0 + ? formatTokens(m.cached_input_tokens) + : EM_DASH} + + + {m.output_tokens > 0 ? formatTokens(m.output_tokens) : EM_DASH} + + + {formatTokens(m.total_tokens)} + + + )} + + {isAudioOnly(m) ? EM_DASH : } + +
+ ))} +
+
+
+

+ {t("web.admin.insights.ai.models.note")} +

+ +
+
+ + + + + {t("web.admin.insights.ai.features.title")} + + + +
+ + + + {t("web.admin.insights.ai.column.feature")} + {t("web.admin.insights.ai.column.models")} + + {t("web.admin.insights.ai.column.requests")} + + + {t("web.admin.insights.ai.column.usage")} + + + {t("web.admin.insights.ai.column.share")} + + + + + {data.features.map((f) => ( + + {t(featureLabelKey(f.feature))} + + {f.models.join(", ")} + + + {formatCount(f.requests)} + + + {isAudioOnly(f) + ? t("web.admin.insights.ai.features.audio", { + duration: formatWatchTime(f.audio_seconds), + }) + : t("web.admin.insights.ai.tokens", { + value: formatTokens(f.total_tokens), + })} + + + {isAudioOnly(f) ? EM_DASH : } + + + ))} + +
+
+
+
+
+ ); +} diff --git a/web/src/pages/admin-insights/BandwidthTab.tsx b/web/src/pages/admin-insights/BandwidthTab.tsx index 717506e1408..f913301111b 100644 --- a/web/src/pages/admin-insights/BandwidthTab.tsx +++ b/web/src/pages/admin-insights/BandwidthTab.tsx @@ -42,7 +42,12 @@ import { type InsightsFilterState, insightRefreshProps, } from "./insightsHelpers"; -import { InsightKpiCard, InsightNoticeBanner, InsightSectionError } from "./insightsShared"; +import { + InsightKpiCard, + InsightNoticeBanner, + InsightSectionError, + ShareBar, +} from "./insightsShared"; type BandwidthMetric = "volume" | "peak"; type BandwidthScope = "total" | "nodes"; @@ -380,7 +385,6 @@ export function BandwidthTab({ filters }: { filters: InsightsFilterState }) { src.kind === "api" ? t("web.admin.insights.bandwidth.chart.apiServer") : src.name; - const sharePct = Math.max(0, Math.min(100, src.share_of_total * 100)); return ( @@ -401,19 +405,7 @@ export function BandwidthTab({ filters }: { filters: InsightsFilterState }) { {formatDataTotal(src.egress_bytes)} -
-
-
-
- - {t("web.admin.insights.percent", { - value: formatRatePercentNumber(src.share_of_total), - })} - -
+ {formatMbps(src.peak_egress_kbps / 1_000)} diff --git a/web/src/pages/admin-insights/insightsHelpers.ts b/web/src/pages/admin-insights/insightsHelpers.ts index caf410f7341..2a497779594 100644 --- a/web/src/pages/admin-insights/insightsHelpers.ts +++ b/web/src/pages/admin-insights/insightsHelpers.ts @@ -15,6 +15,7 @@ export const INSIGHTS_TABS = [ "people", "devices", "bandwidth", + "ai", ] as const; export type InsightsTab = (typeof INSIGHTS_TABS)[number]; /** The live streams tab, which the page opens on when the URL names no tab. */ diff --git a/web/src/pages/admin-insights/insightsShared.tsx b/web/src/pages/admin-insights/insightsShared.tsx index d921843350a..69bdfa7a595 100644 --- a/web/src/pages/admin-insights/insightsShared.tsx +++ b/web/src/pages/admin-insights/insightsShared.tsx @@ -5,6 +5,8 @@ import { Button } from "@/components/ui/button"; import { useT } from "@/i18n"; import { cn } from "@/lib/utils"; +import { formatRatePercentNumber } from "./insightsHelpers"; + export function InsightKpiCard({ label, value, @@ -74,3 +76,22 @@ export function InsightSectionError({ error, onRetry }: { error: unknown; onRetr
); } + +/** A share of a total as a small bar and a percentage, for table cells. */ +export function ShareBar({ share }: { share: number }) { + const t = useT(); + const pct = Math.max(0, Math.min(100, share * 100)); + return ( +
+
+
+
+ + {t("web.admin.insights.percent", { value: formatRatePercentNumber(share) })} + +
+ ); +}