(self)
| 2100 | return cost |
| 2101 | |
| 2102 | def show_usage_report(self): |
| 2103 | if not self.usage_report: |
| 2104 | return |
| 2105 | |
| 2106 | self.total_tokens_sent += self.message_tokens_sent |
| 2107 | self.total_tokens_received += self.message_tokens_received |
| 2108 | |
| 2109 | self.io.tool_output(self.usage_report) |
| 2110 | |
| 2111 | prompt_tokens = self.message_tokens_sent |
| 2112 | completion_tokens = self.message_tokens_received |
| 2113 | self.event( |
| 2114 | "message_send", |
| 2115 | main_model=self.main_model, |
| 2116 | edit_format=self.edit_format, |
| 2117 | prompt_tokens=prompt_tokens, |
| 2118 | completion_tokens=completion_tokens, |
| 2119 | total_tokens=prompt_tokens + completion_tokens, |
| 2120 | cost=self.message_cost, |
| 2121 | total_cost=self.total_cost, |
| 2122 | ) |
| 2123 | |
| 2124 | self.message_cost = 0.0 |
| 2125 | self.message_tokens_sent = 0 |
| 2126 | self.message_tokens_received = 0 |
| 2127 | |
| 2128 | def get_multi_response_content_in_progress(self, final=False): |
| 2129 | cur = self.multi_response_content or "" |
no test coverage detected