From af09104c824baa6a3057193f225d5713062e0d6c Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 10 Dec 2024 23:02:54 +0530 Subject: [PATCH] moved log to only print on change, and changed error logs to warnings --- app/components/chat/BaseChat.tsx | 4 +++- app/utils/constants.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index 1da80d6..99120b3 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -147,7 +147,9 @@ export const BaseChat = React.forwardRef( return () => clearInterval(interval); }, [PROVIDER_LIST]); - console.log(transcript); + useEffect(() => { + console.log(transcript); + },[transcript]) useEffect(() => { // Load API keys from cookies on component mount try { diff --git a/app/utils/constants.ts b/app/utils/constants.ts index eb90f29..1205bd6 100644 --- a/app/utils/constants.ts +++ b/app/utils/constants.ts @@ -384,7 +384,7 @@ async function getOllamaModels(): Promise { maxTokenAllowed: 8000, })); } catch (e) { - console.error('Error getting Ollama models:', e); + console.warn('Failed to get Ollama models:', e); return []; } } @@ -472,7 +472,7 @@ async function getLMStudioModels(): Promise { provider: 'LMStudio', })); } catch (e) { - console.error('Error getting LMStudio models:', e); + console.warn('Failed to get LMStudio models:', e); return []; } }