mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
Add token and cost calculation to message completion
This commit is contained in:
parent
f81acb839c
commit
57964f1e79
1 changed files with 2 additions and 3 deletions
|
@ -1137,6 +1137,8 @@ class Coder:
|
|||
if interrupted:
|
||||
raise KeyboardInterrupt
|
||||
|
||||
self.calculate_and_show_tokens_and_cost(messages, completion)
|
||||
|
||||
def show_send_output(self, completion):
|
||||
if self.verbose:
|
||||
print(completion)
|
||||
|
@ -1169,8 +1171,6 @@ class Coder:
|
|||
self.io.tool_error(show_content_err)
|
||||
raise Exception("No data found in LLM response!")
|
||||
|
||||
self.calculate_and_show_tokens_and_cost(completion)
|
||||
|
||||
show_resp = self.render_incremental_response(True)
|
||||
if self.show_pretty():
|
||||
show_resp = Markdown(
|
||||
|
@ -1228,7 +1228,6 @@ class Coder:
|
|||
sys.stdout.flush()
|
||||
yield text
|
||||
|
||||
self.calculate_and_show_tokens_and_cost()
|
||||
|
||||
def live_incremental_response(self, final):
|
||||
show_resp = self.render_incremental_response(final)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue