From 7bf6f7af878b3f00b467e5d112c06018665b528b Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Wed, 7 Jun 2023 19:51:14 +0800 Subject: [PATCH] fix: title generation cost calculation fixes #330 --- src/hooks/useSubmit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useSubmit.ts b/src/hooks/useSubmit.ts index 4ae9cc7..3240f41 100644 --- a/src/hooks/useSubmit.ts +++ b/src/hooks/useSubmit.ts @@ -189,7 +189,7 @@ const useSubmit = () => { // update tokens used for generating title if (countTotalTokens) { - const model = currChats[currentChatIndex].config.model; + const model = _defaultChatConfig.model; updateTotalTokenUsed(model, [message], { role: 'assistant', content: title,