From d5787dcdff084b6db4cc96a62fbd110bd7badfce Mon Sep 17 00:00:00 2001 From: peterdanwan Date: Fri, 20 Sep 2024 22:32:18 -0400 Subject: [PATCH] fix: token information uses console.error() instead console.log() --- src/ai.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ai.js b/src/ai.js index 7c47743..cd6c5fc 100644 --- a/src/ai.js +++ b/src/ai.js @@ -109,9 +109,9 @@ function displayTokens(usage) { const completionTokens = usage.candidatesTokenCount || 0; const promptTokens = usage.promptTokenCount || 0; - console.log(); - console.log(chalk.blue('Tokens Used:')); - console.log(`${chalk.yellow('Prompt Tokens:')} ${promptTokens}`); - console.log(`${chalk.yellow('Completion Tokens:')} ${completionTokens}`); - console.log(`${chalk.yellow('Total Tokens:')} ${totalTokens}`); + console.error(); + console.error(chalk.blue('Tokens Used:')); + console.error(`${chalk.yellow('Prompt Tokens:')} ${promptTokens}`); + console.error(`${chalk.yellow('Completion Tokens:')} ${completionTokens}`); + console.error(`${chalk.yellow('Total Tokens:')} ${totalTokens}`); }