From 930859980fb2c8f367fc142f2690cd37b781270e Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 21 Feb 2024 12:19:08 -0800 Subject: [PATCH 1/2] fix: latex delimiters --- src/lib/components/chat/Messages/ResponseMessage.svelte | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 1360a5c93..581259c8c 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -81,7 +81,9 @@ }
prompt_token/s: ${ Math.round( - ((message.info.prompt_eval_count ?? 0) / (message.info.prompt_eval_duration / 1000000000)) * 100 + ((message.info.prompt_eval_count ?? 0) / + (message.info.prompt_eval_duration / 1000000000)) * + 100 ) / 100 ?? 'N/A' } tokens
total_duration: ${ @@ -115,9 +117,10 @@ // • auto-render specific keys, e.g.: delimiters: [ { left: '$$', right: '$$', display: true }, - // { left: '$', right: '$', display: false }, + { left: '$', right: '$', display: false }, { left: '\\(', right: '\\)', display: true }, - { left: '\\[', right: '\\]', display: true } + { left: '\\[', right: '\\]', display: true }, + { left: '[', right: ']', display: true } ], // • rendering keys, e.g.: throwOnError: false From 5a1f0e0a87b2f45a4379ac07458525a513ca8455 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 21 Feb 2024 12:23:03 -0800 Subject: [PATCH 2/2] Update ResponseMessage.svelte --- src/lib/components/chat/Messages/ResponseMessage.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 581259c8c..ca64575d5 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -116,11 +116,11 @@ // customised options // • auto-render specific keys, e.g.: delimiters: [ - { left: '$$', right: '$$', display: true }, + { left: '$$', right: '$$', display: false }, { left: '$', right: '$', display: false }, - { left: '\\(', right: '\\)', display: true }, - { left: '\\[', right: '\\]', display: true }, - { left: '[', right: ']', display: true } + { left: '\\(', right: '\\)', display: false }, + { left: '\\[', right: '\\]', display: false }, + { left: '[ ', right: ' ]', display: false } ], // • rendering keys, e.g.: throwOnError: false