|
|
@@ -32,7 +32,7 @@
|
|
|
</NLayoutContent>
|
|
|
</NLayout>
|
|
|
<n-modal v-model:show="showModal">
|
|
|
- <n-card style="width: 600px" title="生成结果" :bordered="false" size="huge" role="dialog" aria-modal="true">
|
|
|
+ <n-card style="width: 800px" title="生成结果" :bordered="false" size="huge" role="dialog" aria-modal="true">
|
|
|
<n-data-table
|
|
|
remote
|
|
|
:columns="resultColumns"
|
|
|
@@ -329,6 +329,16 @@ function getResults() {
|
|
|
const resultColumns: DataTableColumn[] = [
|
|
|
{ title: '#', key: 'id' },
|
|
|
{ title: '生成时间', key: 'createdAt', render: timeFormatter },
|
|
|
+ { title: '耗时', key: 'duration', render: (row: any) => `${(row.duration / 60).toFixed(1)}分钟` },
|
|
|
+ {
|
|
|
+ title: 'Token消耗',
|
|
|
+ key: 'tokenUsage',
|
|
|
+ width: '250px',
|
|
|
+ render: (row: any) =>
|
|
|
+ `P:${(row.tokenUsage.promptTokens / 1000).toFixed(1)}K / C:${(
|
|
|
+ row.tokenUsage.completionTokens / 1000
|
|
|
+ ).toFixed(1)}K / T:${(row.tokenUsage.totalTokens / 1000).toFixed(1)}K`
|
|
|
+ },
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|