Better logs for response

This commit is contained in:
yoannchb-pro
2023-06-20 15:02:38 -04:00
parent b67727a4ff
commit 0eac796a5b
4 changed files with 10 additions and 9 deletions
+4 -4
View File
@@ -50,8 +50,9 @@
static array(arr) {
console.log("[CORRECTS] ", arr);
}
static response(text) {
console.log(text);
static response(gptAnswer) {
console.log("Original:\n" + gptAnswer.response);
console.log("Normalized:\n" + gptAnswer.normalizedResponse);
}
}
@@ -386,8 +387,7 @@
}
if (config.logs) {
Logs.question(question);
Logs.response("Original: " + gptAnswer.response);
Logs.response("Normalized: " + gptAnswer.normalizedResponse);
Logs.response(gptAnswer);
}
/* Handle clipboard mode */
if (config.mode === "clipboard") {
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -48,8 +48,7 @@ async function reply(
if (config.logs) {
Logs.question(question);
Logs.response("Original: " + gptAnswer.response);
Logs.response("Normalized: " + gptAnswer.normalizedResponse);
Logs.response(gptAnswer);
}
/* Handle clipboard mode */
+4 -2
View File
@@ -1,3 +1,4 @@
import GPTAnswer from "../types/gptAnswer";
class Logs {
static question(text: string) {
const css = "color: cyan";
@@ -13,8 +14,9 @@ class Logs {
console.log("[CORRECTS] ", arr);
}
static response(text: string) {
console.log(text);
static response(gptAnswer: GPTAnswer) {
console.log("Original:\n" + gptAnswer.response);
console.log("Normalized:\n" + gptAnswer.normalizedResponse);
}
}