Skip to content

Commit eea7bf2

Browse files
committed
token counting display only when tokens is passed
1 parent 1d5bb84 commit eea7bf2

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/main.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,16 @@ fn main() -> Result<()> {
176176
println!("{}", serde_json::to_string_pretty(&json_output)?);
177177
return Ok(());
178178
} else {
179-
println!(
180-
"{}{}{} Token count: {}, Model info: {}",
181-
"[".bold().white(),
182-
"i".bold().blue(),
183-
"]".bold().white(),
184-
token_count.to_string().bold().yellow(),
185-
model_info
186-
);
179+
if args.tokens {
180+
println!(
181+
"{}{}{} Token count: {}, Model info: {}",
182+
"[".bold().white(),
183+
"i".bold().blue(),
184+
"]".bold().white(),
185+
token_count.to_string().bold().yellow(),
186+
model_info
187+
);
188+
}
187189
}
188190

189191
// Copy to Clipboard

0 commit comments

Comments
 (0)