mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-03 09:28:25 +02:00
13 lines
258 B
Python
13 lines
258 B
Python
from typing import Generic
|
|
from typing import TypeVar
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
class MetricsHander(Generic[T]):
|
|
def __init__(self) -> None:
|
|
self.metrics: T | None = None
|
|
|
|
def record_metric(self, metrics: T) -> None:
|
|
self.metrics = metrics
|