MCPcopy Create free account
hub / github.com/GXimingLu/Quark / __init__

Method __init__

utils/perspective_api.py:52–56  ·  view source on GitHub ↗
(self, api_key: str = PERSPECTIVE_API_KEY, rate_limit: int = 25)

Source from the content-addressed store, hash-verified

50
51class 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):

Callers

nothing calls this directly

Calls 1

_make_serviceMethod · 0.95

Tested by

no test coverage detected