diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 5b04f7ae..c6d53424 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -35,16 +35,26 @@ if (message.info) { tippy(`#info-${message.id}`, { content: `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' }
- total_duration: ${message.info.total_duration ?? 'N/A'}
- load_duration: ${message.info.load_duration ?? 'N/A'}
- sample_count: ${message.info.sample_count ?? 'N/A'}
- sample_duration: ${message.info.sample_duration ?? 'N/A'}
+ total_duration: ${ + Math.round(((message.info.total_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A' + }ms
+ load_duration: ${ + Math.round(((message.info.load_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A' + }ms
prompt_eval_count: ${message.info.prompt_eval_count ?? 'N/A'}
- prompt_eval_duration: ${message.info.prompt_eval_duration ?? 'N/A'}
+ prompt_eval_duration: ${ + Math.round(((message.info.prompt_eval_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A' + }ms
eval_count: ${message.info.eval_count ?? 'N/A'}
- eval_duration: ${message.info.eval_duration ?? 'N/A'}
`, + eval_duration: ${ + Math.round(((message.info.eval_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A' + }ms`, allowHTML: true }); }