Better logs for response
This commit is contained in:
@@ -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
@@ -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
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user