mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 17:55:24 +00:00
Update dashboard data test to reflect correct structure and parameters. (#5010)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
This commit is contained in:
@@ -254,22 +254,39 @@ describe('channel api', () => {
|
|||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
timestamp: 1000,
|
timestamp: 1000,
|
||||||
summary: []
|
summary: [
|
||||||
|
{
|
||||||
|
model: 'gpt-3.5',
|
||||||
|
total_tokens: 100,
|
||||||
|
request_count: 10,
|
||||||
|
total_price: 0.002
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const result = await getDashboardV2({
|
const result = await getDashboardV2({
|
||||||
|
channel: 1,
|
||||||
|
model: 'gpt-3.5',
|
||||||
start_timestamp: 0,
|
start_timestamp: 0,
|
||||||
end_timestamp: 1000,
|
end_timestamp: 1000,
|
||||||
|
timezone: 'UTC',
|
||||||
timespan: 'minute'
|
timespan: 'minute'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result).toEqual([
|
expect(result).toEqual([
|
||||||
{
|
{
|
||||||
timestamp: 1000,
|
timestamp: 1000,
|
||||||
summary: []
|
summary: [
|
||||||
|
{
|
||||||
|
model: 'gpt-3.5',
|
||||||
|
total_tokens: 100,
|
||||||
|
request_count: 10,
|
||||||
|
total_price: 0.002
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user