← Về thư mục
openai4s/doubao_search.py
- DoubaoSearchStore · class · L49-L54 — class DoubaoSearchStore(Protocol)
- get_setting · method · L52-L52 — def get_setting(self, key: str, default: str | None = None) -> str | None
- get_secret_setting · method · L54-L54 — def get_secret_setting(self, key: str) -> str
- DoubaoSearchError · class · L57-L60 — class DoubaoSearchError(RuntimeError)
- DoubaoSearchAuthError · class · L63-L66 — class DoubaoSearchAuthError(DoubaoSearchError)
- DoubaoSearchResponseError · class · L69-L72 — class DoubaoSearchResponseError(DoubaoSearchError)
- _NoRedirect · class · L75-L79 — class _NoRedirect(urllib.request.HTTPRedirectHandler)
- redirect_request · method · L78-L79 — def redirect_request(self, _args: Any, *_kwargs: Any) -> None
- _query · function · L82-L92 — def _query(value: Any) -> str
- _count · function · L95-L106 — def _count(value: Any) -> int
- _timeout · function · L109-L116 — def _timeout(value: Any) -> float
- _read_capped · function · L119-L161 — def _read_capped( response: Any, *, limit: int, exchange: HTTPExchangeDeadline, require_bound: bool = True, ) -> bytes
- _oversize · function · L135-L138 — def _oversize() -> BaseException
- _safe_error_code · function · L164-L178 — def _safe_error_code(value: Any) -> str
- _provider_error · function · L181-L199 — def _provider_error(payload: Mapping[str, Any]) -> tuple[str, bool] | None
- _redact_provider_payload · function · L202-L253 — def _redact_provider_payload(payload: Any, secret: str) -> Any
- _text · function · L256-L264 — def _text(item: Mapping[str, Any], field: str, *, required: bool = False) -> str
- _result_url · function · L267-L284 — def _result_url(item: Mapping[str, Any]) -> str
- _normalize · function · L287-L344 — def _normalize(payload: Any, *, query: str, limit: int) -> dict[str, Any]
- DoubaoSearchService · class · L347-L560 — class DoubaoSearchService
- init · method · L350-L357 — def init( self, store: DoubaoSearchStore, *, opener: Any | None = None, ) -> None
- configured · method · L359-L366 — def configured(self) -> bool
- _resolved_key · method · L368-L378 — def _resolved_key(self) -> str
- _check_network_policy · method · L381-L388 — def _check_network_policy() -> None
- _search_with_key · method · L390-L507 — def _search_with_key( self, key: str, query: Any, *, num_results: Any, timeout: Any, ) -> dict[str, Any]
- search · method · L509-L524 — def search( self, query: Any, *, num_results: Any = 8, timeout: Any = 20.0, ) -> dict[str, Any]
- search_primary · method · L526-L560 — def search_primary( self, query: Any, *, num_results: Any = 8, timeout: Any = 20.0, fallback: Callable[..., dict[str, Any]], ) -> dict[str, Any]