Reset client statistics
(&self)
| 796 | |
| 797 | /// Reset client statistics |
| 798 | fn reset_stats(&self) -> PyResult<()> { |
| 799 | get_runtime().block_on(async { |
| 800 | let mut stats = self.stats.write().await; |
| 801 | stats.total_requests = 0; |
| 802 | stats.successful_requests = 0; |
| 803 | stats.failed_requests = 0; |
| 804 | stats.average_response_time_ms = 0.0; |
| 805 | }); |
| 806 | Ok(()) |
| 807 | } |
| 808 | |
| 809 | /// Complete with full response object (synchronous) |
| 810 | #[instrument(skip(self, py), fields(prompt_len = prompt.len()))] |