Update the calculate_and_show_tokens_and_cost method to use the messages parameter if completion.usage is not available.

This commit is contained in:
Paul Gauthier (aider) 2024-07-28 15:54:04 -03:00
parent da257c33a0
commit afe50cab3d

View file

@ -1137,7 +1137,7 @@ class Coder:
if interrupted:
raise KeyboardInterrupt
self.calculate_and_show_tokens_and_cost(messages, completion)
self.calculate_and_show_tokens_and_cost(messages, completion)
def show_send_output(self, completion):
if self.verbose: