From 83cf5f01aadea5c6f19620135458136f0f6e9040 Mon Sep 17 00:00:00 2001 From: dakai Date: Sun, 6 Oct 2024 10:39:58 +0800 Subject: [PATCH] style: fix formatting in api.ts and chat.ts files --- app/client/api.ts | 1 + app/store/chat.ts | 2 +- app/utils.ts | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/api.ts b/app/client/api.ts index 389c72e13..c74c883db 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -37,6 +37,7 @@ export interface MultimodalContent { file_url?: { url: string; name: string; + tokenCount?: string; }; } diff --git a/app/store/chat.ts b/app/store/chat.ts index ecdb2d46c..64ed375c2 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -366,6 +366,7 @@ export const useChatStore = createPersistStore( file_url: { url: file.url, name: file.name, + tokenCount: file.tokenCount, }, }; }), @@ -424,7 +425,6 @@ export const useChatStore = createPersistStore( mContent = userContent; displayContent = userContent; } - let userMessage: ChatMessage = createMessage({ role: "user", content: mContent, diff --git a/app/utils.ts b/app/utils.ts index 479803cfb..76bc9e014 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -61,7 +61,6 @@ export const countTokens = async (file: UploadFile) => { } } let totalTokenCount = (totalTokens / 1000).toFixed(2).toString() + "K"; - console.log(totalTokenCount); return totalTokenCount; };