← Về thư mục
openai4s/kernel/background.py
- _BackgroundJob · class · L38-L108 — class _BackgroundJob
- init · method · L57-L72 — def init(self, exec_id: str, code: str)
- _on_chunk · method · L74-L86 — def _on_chunk(self, text: str) -> None
- stdout_so_far · method · L88-L91 — def stdout_so_far(self) -> str
- peek · method · L93-L108 — def peek(self) -> dict
- BackgroundExecutor · class · L111-L363 — class BackgroundExecutor
- init · method · L114-L130 — def init( self, kernel_factory: Any, dispatcher: Any, *, lifetime_factory: Any = None, ): # kernel_factory -> a fresh Kernel bound to
dispatcher.
- _enter_lifetime · method · L140-L149 — def _enter_lifetime(self) -> Any
- _exit_lifetime · method · L152-L160 — def _exit_lifetime(job: _BackgroundJob) -> None
- launch · method · L162-L286 — def launch(self, code: str, origin: str = "agent") -> dict
- _run · function · L210-L266 — def _run() -> None
- _get · method · L288-L293 — def _get(self, exec_id: str) -> _BackgroundJob
- peek · method · L295-L296 — def peek(self, exec_id: str) -> dict
- interrupt · method · L298-L320 — def interrupt(self, exec_id: str) -> dict
- list_jobs · method · L322-L324 — def list_jobs(self) -> list[dict]
- shutdown · method · L326-L363 — def shutdown(self, timeout_per_job: float = 5.0) -> int