(self, api_key: str = PERSPECTIVE_API_KEY, rate_limit: int = 25)
| 50 | |
| 51 | class PerspectiveAPI: |
| 52 | def __init__(self, api_key: str = PERSPECTIVE_API_KEY, rate_limit: int = 25): |
| 53 | self.service = self._make_service(api_key) |
| 54 | self.last_request_time = -1 # satisfies initial condition |
| 55 | self.rate_limit = rate_limit |
| 56 | self.next_uid = 0 |
| 57 | |
| 58 | def request(self, texts: Union[str, List[str]]) -> List[Tuple[Optional[Dict[str, Any]], Optional[HttpError]]]: |
| 59 | if isinstance(texts, str): |
nothing calls this directly
no test coverage detected