fix: Token统计准确性修复 + 仪表盘增强
1. 修复eval_count只记最后一轮的bug:改为每轮累加 2. 新增prompt_eval_count(输入token)统计 3. 修复total_duration使用Ollama实际推理时间而非墙钟时间 4. 数据库messages表新增prompt_eval_count列(含兼容迁移) 5. 仪表盘显示输入/输出token分项统计 6. 柱状图堆叠显示输入(紫色)+输出(橙色)比例 7. 明细表格新增输入/输出/合计三列
This commit is contained in:
Vendored
+2
@@ -36,6 +36,7 @@ export interface OllamaStreamChunk {
|
||||
};
|
||||
done?: boolean;
|
||||
eval_count?: number;
|
||||
prompt_eval_count?: number;
|
||||
total_duration?: number;
|
||||
}
|
||||
|
||||
@@ -99,6 +100,7 @@ export interface ChatMessage {
|
||||
model?: string;
|
||||
think?: string;
|
||||
eval_count?: number;
|
||||
prompt_eval_count?: number;
|
||||
total_duration?: number;
|
||||
images?: string[];
|
||||
files?: ChatFile[];
|
||||
|
||||
Reference in New Issue
Block a user