From 042812239d7891e486c83ed8908491f3122db7c6 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Sat, 4 Mar 2023 06:33:04 +0800 Subject: [PATCH] chore: remove console.logs --- src/api/customApi.ts | 3 --- src/api/freeApi.ts | 2 -- src/api/helper.ts | 1 - src/components/Chat/ChatContent/ChatContent.tsx | 1 - 4 files changed, 7 deletions(-) diff --git a/src/api/customApi.ts b/src/api/customApi.ts index a8aa777..68aa1ee 100644 --- a/src/api/customApi.ts +++ b/src/api/customApi.ts @@ -12,7 +12,6 @@ export const validateApiKey = async (apiKey: string) => { }, }); const data = await response.json(); - console.log(data); if (response.status === 401) return false; else if (response.status === 400) return true; @@ -39,7 +38,6 @@ export const getChatCompletion = async ( }), }); const data = await response.json(); - console.log(data); return data; } catch (error) { console.error('Error:', error); @@ -63,7 +61,6 @@ export const getChatCompletionStream = async ( stream: true, }), }); - console.log(response); const stream = response.body; return stream; } catch (error) { diff --git a/src/api/freeApi.ts b/src/api/freeApi.ts index 5378154..3b09633 100644 --- a/src/api/freeApi.ts +++ b/src/api/freeApi.ts @@ -15,7 +15,6 @@ export const getChatCompletion = async (messages: MessageInterface[]) => { }), }); const data = await response.json(); - console.log(data); return data; } catch (error) { console.error('Error:', error); @@ -35,7 +34,6 @@ export const getChatCompletionStream = async (messages: MessageInterface[]) => { stream: true, }), }); - console.log(response); const stream = response.body; return stream; } catch (error) { diff --git a/src/api/helper.ts b/src/api/helper.ts index 298748f..e50a0ff 100644 --- a/src/api/helper.ts +++ b/src/api/helper.ts @@ -11,7 +11,6 @@ export const parseEventSource = ( .split('\n') .map((line) => line.replace(/^data: /, '')) .join(''); - console.log(jsonString); if (jsonString === '[DONE]') return jsonString; else return JSON.parse(jsonString); }); diff --git a/src/components/Chat/ChatContent/ChatContent.tsx b/src/components/Chat/ChatContent/ChatContent.tsx index 0436cf4..2250702 100644 --- a/src/components/Chat/ChatContent/ChatContent.tsx +++ b/src/components/Chat/ChatContent/ChatContent.tsx @@ -58,7 +58,6 @@ const ChatContent = () => { return output; } }, ''); - console.log(resultString); const updatedMessages: MessageInterface[] = JSON.parse( JSON.stringify(useStore.getState().messages)