Skip to content

Commit

Permalink
fix: token information uses console.error() instead console.log()
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeName0 committed Sep 21, 2024
1 parent 06b68ec commit d5787dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ai.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}

0 comments on commit d5787dc

Please sign in to comment.