chore: remove console.logs

This commit is contained in:
Jing Hua 2023-03-04 06:33:04 +08:00
parent 303ebf436b
commit 042812239d
4 changed files with 0 additions and 7 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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);
});

View file

@ -58,7 +58,6 @@ const ChatContent = () => {
return output;
}
}, '');
console.log(resultString);
const updatedMessages: MessageInterface[] = JSON.parse(
JSON.stringify(useStore.getState().messages)