← Về thư mục
openai4s/adapters/jupyter/bridge.py
- JupyterBridgeUnavailable · class · L23-L24 — class JupyterBridgeUnavailable(RuntimeError)
- _load_ipykernel · function · L27-L41 — def _load_ipykernel() -> tuple[type, type]
- _spawn_runtime · function · L44-L53 — def _spawn_runtime(language: str, cwd: str) -> Any
- _language_info · function · L56-L73 — def _language_info(language: str) -> dict[str, Any]
- _error_fields · function · L76-L86 — def _error_fields(error: Any, *, fallback: str = "OpenAI4SKernelError") -> dict
- create_kernel_class · function · L89-L255 — def create_kernel_class( language: str, *, kernel_base: type | None = None, runtime_factory: RuntimeFactory | None = None, ) -> type
- OpenAI4SJupyterKernel · class · L109-L247 — class OpenAI4SJupyterKernel(kernel_base)
- init · method · L119-L122 — def init(self, args: Any, *kwargs: Any) -> None
- _stream · method · L124-L131 — def _stream(self, name: str, text: Any) -> None
- do_execute · method · L133-L209 — def do_execute( self, code: str, silent: bool, store_history: bool = True, user_expressions: dict | None = None, allow_stdin: bool = False, **_kwargs: Any, ) -> dict
- on_chunk · function · L145-L148 — def on_chunk(text: str) -> None
- interrupt_request · method · L211-L237 — async def interrupt_request(self, stream: Any, ident: Any, parent: Any) -> Any: #
interrupt_mode=message means this handler owns delivery. # KernelBase.interrupt_request() sends SIGINT to the bridge (or its # whole process group); calling it after interrupting our exact # child would double-deliver the signal and can kill the bridge.
- do_shutdown · method · L239-L247 — def do_shutdown(self, restart: bool) -> dict
- build_parser · function · L258-L265 — def build_parser() -> argparse.ArgumentParser
- main · function · L268-L278 — def main(argv: list[str] | None = None) -> int