feat: readable verbose output

This commit is contained in:
Timothy J. Baek 2023-12-14 18:19:50 -08:00
parent 9f66cdbb0b
commit 665ba90d34

View file

@ -35,16 +35,26 @@
if (message.info) { if (message.info) {
tippy(`#info-${message.id}`, { tippy(`#info-${message.id}`, {
content: `<span class="text-xs">token/s: ${ content: `<span class="text-xs">token/s: ${
(message.info.eval_count ?? 0) / message.info.eval_duration ?? 'N/A' `${
Math.round(
((message.info.eval_count ?? 0) / (message.info.eval_duration / 1000000000)) * 100
) / 100
} tokens` ?? 'N/A'
}<br/> }<br/>
total_duration: ${message.info.total_duration ?? 'N/A'}<br/> total_duration: ${
load_duration: ${message.info.load_duration ?? 'N/A'}<br/> Math.round(((message.info.total_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A'
sample_count: ${message.info.sample_count ?? 'N/A'}<br/> }ms<br/>
sample_duration: ${message.info.sample_duration ?? 'N/A'}<br/> load_duration: ${
Math.round(((message.info.load_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A'
}ms<br/>
prompt_eval_count: ${message.info.prompt_eval_count ?? 'N/A'}<br/> prompt_eval_count: ${message.info.prompt_eval_count ?? 'N/A'}<br/>
prompt_eval_duration: ${message.info.prompt_eval_duration ?? 'N/A'}<br/> prompt_eval_duration: ${
Math.round(((message.info.prompt_eval_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A'
}ms<br/>
eval_count: ${message.info.eval_count ?? 'N/A'}<br/> eval_count: ${message.info.eval_count ?? 'N/A'}<br/>
eval_duration: ${message.info.eval_duration ?? 'N/A'}</span>`, eval_duration: ${
Math.round(((message.info.eval_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A'
}ms</span>`,
allowHTML: true allowHTML: true
}); });
} }