(self)
| 716 | return (0.0, 0.0, 0.0) |
| 717 | |
| 718 | def reset_usage_cost(self) -> None: |
| 719 | for mdl in [self.config.chat_model, self.config.completion_model]: |
| 720 | if mdl is None: |
| 721 | return |
| 722 | if mdl not in self.usage_cost_dict: |
| 723 | self.usage_cost_dict[mdl] = LLMTokenUsage() |
| 724 | counter = self.usage_cost_dict[mdl] |
| 725 | counter.reset() |
| 726 | |
| 727 | def update_usage_cost( |
| 728 | self, chat: bool, prompts: int, completions: int, cost: float |