← Về thư mục
openai4s/server/model_discovery.py
- LocalModelEndpoint · class · L24-L30 — class LocalModelEndpoint
- _RejectRedirects · class · L61-L71 — class _RejectRedirects(HTTPRedirectHandler)
- redirect_request · method · L69-L71 — def redirect_request(self, req, fp, code, msg, headers, newurl)
- _loopback_http · function · L74-L89 — def _loopback_http(url: str) -> bool
- LocalModelDiscoveryService · class · L92-L243 — class LocalModelDiscoveryService
- init · method · L95-L121 — def init( self, *, endpoints: Iterable[LocalModelEndpoint] = DEFAULT_LOCAL_ENDPOINTS, timeout_s: float = 0.25, cache_ttl_s: float = 5.0, max_response_bytes: int = 1_000_000, opener: Any | None = None, clock: Callable[[], float] = time.monotonic, ) -> None
- discover · method · L123-L146 — def discover(self, *, force: bool = False) -> dict[str, Any]
- catalog · method · L148-L175 — def catalog(self) -> dict[str, Any]
- _probe · method · L177-L209 — def _probe(self, endpoint: LocalModelEndpoint) -> dict[str, Any] | None
- _model_ids · method · L212-L233 — def _model_ids(payload: Any) -> list[str]
- _payload · method · L235-L243 — def _payload( self, endpoints: tuple[dict[str, Any], ...], *, cached: bool ) -> dict[str, Any]