c19d5aa663
Add a shared `performance-metrics` feature module for perf metric APIs, DTOs, and formatting, then surface global 24h model performance on the dashboard with cards and a top-model table. Reuse the shared metrics module from pricing model details, remove duplicated perf API/formatting code from pricing, and add localized labels for the new dashboard performance UI.
13 lines
402 B
TypeScript
Vendored
13 lines
402 B
TypeScript
Vendored
import { api } from '@/lib/api'
|
|
import type { PricingData } from './types'
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// Pricing APIs
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Get model pricing data
|
|
export async function getPricing(): Promise<PricingData> {
|
|
const res = await api.get('/api/pricing')
|
|
return res.data
|
|
}
|