MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / update_stats

Method update_stats

optillm/inference.py:783–788  ·  view source on GitHub ↗

Update prompt success statistics

(self, prompt: str, success: bool)

Source from the content-addressed store, hash-verified

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
790class DynamicTemperature:
791 """Implements dynamic temperature scaling based on input characteristics"""

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected