feat: model usage
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
import { formatLargeNumber } from '@/utils';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export const overviewConfigs = [
|
||||
{
|
||||
key: 'worker_count',
|
||||
@@ -25,52 +22,6 @@ export const overviewConfigs = [
|
||||
}
|
||||
];
|
||||
|
||||
export const exportTableColumns = [
|
||||
{
|
||||
title: 'Date',
|
||||
dataIndex: 'date',
|
||||
render: (text: string) => {
|
||||
return dayjs(text).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'User',
|
||||
dataIndex: 'user',
|
||||
render: (text: string) => {
|
||||
return text || 'admin';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Model',
|
||||
dataIndex: 'model',
|
||||
render: (text: string) => {
|
||||
return text || 'All Models';
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Completion Tokens',
|
||||
dataIndex: 'completion_tokens',
|
||||
render: (text: number) => {
|
||||
return formatLargeNumber(text) || 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Prompt Tokens',
|
||||
dataIndex: 'prompt_tokens',
|
||||
render: (text: number) => {
|
||||
return formatLargeNumber(text) || 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'API Requests',
|
||||
dataIndex: 'request_count',
|
||||
render: (text: number) => {
|
||||
return formatLargeNumber(text) || 0;
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export const baseColorMap = {
|
||||
baseL2: 'rgba(13,171,219,0.8)',
|
||||
baseL1: 'rgba(0,34,255,0.8)',
|
||||
|
||||
Reference in New Issue
Block a user