Fernando Maclen
Fernando Maclen
~~It might be being fired twice.~~ Actually, pressing `ENTER` once also confirms the alert once. [The test](https://github.com/fmaclen/hollama/commit/22adf74d5c0da17fbc94946395b5079e78013d2a#diff-b728858cc9ac6c41fb9cebc11f95efebff4b3708eefe0b569f765fee9b52998cR129) is technically also confirming the alert once so 🤷♂️ 
When a completion is streaming from the server the variable is constantly being update so we are parsing the markdown response on every token. This causes a weird behavior where...
> To calculate how fast the response is generated in tokens per second (token/s), divide `eval_count` / `eval_duration`. https://github.com/ollama/ollama/blob/main/docs/api.md#response