Update prompt success statistics
(self, prompt: str, success: bool)
| 781 | self.cache.popitem(last=False) |
| 782 | |
| 783 | def update_stats(self, prompt: str, success: bool): |
| 784 | """Update prompt success statistics""" |
| 785 | signature = self._compute_prompt_signature(prompt) |
| 786 | stats = self.prompt_stats[signature] |
| 787 | stats["count"] += 1 |
| 788 | stats["success_rate"] = (stats["success_rate"] * (stats["count"] - 1) + float(success)) / stats["count"] |
| 789 | |
| 790 | class DynamicTemperature: |
| 791 | """Implements dynamic temperature scaling based on input characteristics""" |
nothing calls this directly
no test coverage detected