← Về thư mục
openai4s/agent/engine.py
- AgentEngine · class · L40-L200 — class AgentEngine
- init · method · L43-L64 — def init( self, model: ModelPort, executor: ActionExecutor, *, context_policy: ContextPolicy | None = None, event_sink: EventSink | None = None, cancellation: CancellationPort | None = None, completion: CompletionPort | None = None, reply_interceptor: ReplyInterceptor | None = None, max_turns: int = 32, ) -> None
- run · method · L66-L140 — def run( self, messages_or_state: RunState | Iterable[Mapping[str, Any]], *, max_turns: int | None = None, ) -> EngineResult
- on_delta · function · L93-L94 — def on_delta(text: str) -> None
- _state · method · L142-L156 — def _state( self, value: RunState | Iterable[Mapping[str, Any]], max_turns: int | None, ) -> RunState
- _reply · method · L159-L162 — def _reply(value: ModelReply | Mapping[str, Any]) -> ModelReply
- _circuit · method · L164-L176 — def _circuit(self, state: RunState) -> ProgressCircuit
- _finish · method · L178-L200 — def _finish( self, state: RunState, completion: Any, stop_reason: str, *, progress_reason: str | None = None, ) -> EngineResult