feat: metring and detail pages

This commit is contained in:
李芳
2025-02-22 18:20:11 +08:00
parent 970ffdac15
commit c50bb49b37
2 changed files with 79 additions and 53 deletions

View File

@@ -28,8 +28,8 @@ const columns: TableProps<ChatMessage>["columns"] = [
},
{
title: "问题",
dataIndex: "query",
key: "query"
dataIndex: "queryContent",
key: "queryContent"
},
{
title: "提示词全文",
@@ -54,14 +54,14 @@ const columns: TableProps<ChatMessage>["columns"] = [
{
title: "回答",
dataIndex: "answer",
key: "answer",
dataIndex: "responseContent",
key: "responseContent",
ellipsis: {
showTitle: false
},
render: (answer) => (
<Tooltip placement="topLeft" title={answer}>
{answer}
render: (responseContent) => (
<Tooltip placement="topLeft" title={responseContent}>
{responseContent}
</Tooltip>
),
width: "10%"
@@ -75,7 +75,7 @@ const columns: TableProps<ChatMessage>["columns"] = [
title: "数联网token",
dataIndex: "iodOutputToken",
key: "iodOutputToken",
render: (iodOutputToken) => <div>{iodOutputToken.length}</div>
render: (iodOutputToken) => <div>{iodOutputToken?.length}</div>
},
{
title: "大模型token",
@@ -83,7 +83,9 @@ const columns: TableProps<ChatMessage>["columns"] = [
dataIndex: "largeModelToken",
render: (_, record) => {
return (
<div>{record.iodInputToken.length + record.iodOutputToken.length}</div>
<div>
{record.iodInputToken?.length + record.iodOutputToken?.length}
</div>
)
}
},
@@ -108,7 +110,7 @@ const columns: TableProps<ChatMessage>["columns"] = [
{/* <a>Invite {record.name}</a> */}
<NavLink to={`/metering/list/${record.id}`}>
<a>Detail</a>
<a></a>
</NavLink>
</Space>
)