mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 21:13:59 +01:00
chore: remove console.logs
This commit is contained in:
parent
303ebf436b
commit
042812239d
|
@ -12,7 +12,6 @@ export const validateApiKey = async (apiKey: string) => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
if (response.status === 401) return false;
|
if (response.status === 401) return false;
|
||||||
else if (response.status === 400) return true;
|
else if (response.status === 400) return true;
|
||||||
|
@ -39,7 +38,6 @@ export const getChatCompletion = async (
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
@ -63,7 +61,6 @@ export const getChatCompletionStream = async (
|
||||||
stream: true,
|
stream: true,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
console.log(response);
|
|
||||||
const stream = response.body;
|
const stream = response.body;
|
||||||
return stream;
|
return stream;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -15,7 +15,6 @@ export const getChatCompletion = async (messages: MessageInterface[]) => {
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
@ -35,7 +34,6 @@ export const getChatCompletionStream = async (messages: MessageInterface[]) => {
|
||||||
stream: true,
|
stream: true,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
console.log(response);
|
|
||||||
const stream = response.body;
|
const stream = response.body;
|
||||||
return stream;
|
return stream;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -11,7 +11,6 @@ export const parseEventSource = (
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((line) => line.replace(/^data: /, ''))
|
.map((line) => line.replace(/^data: /, ''))
|
||||||
.join('');
|
.join('');
|
||||||
console.log(jsonString);
|
|
||||||
if (jsonString === '[DONE]') return jsonString;
|
if (jsonString === '[DONE]') return jsonString;
|
||||||
else return JSON.parse(jsonString);
|
else return JSON.parse(jsonString);
|
||||||
});
|
});
|
||||||
|
|
|
@ -58,7 +58,6 @@ const ChatContent = () => {
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}, '');
|
}, '');
|
||||||
console.log(resultString);
|
|
||||||
|
|
||||||
const updatedMessages: MessageInterface[] = JSON.parse(
|
const updatedMessages: MessageInterface[] = JSON.parse(
|
||||||
JSON.stringify(useStore.getState().messages)
|
JSON.stringify(useStore.getState().messages)
|
||||||
|
|
Loading…
Reference in a new issue