← Về thư mục
openai4s/agent/ports.py
- ModelPort · class · L12-L17 — class ModelPort(Protocol)
- complete · method · L13-L17 — def complete( self, messages: Sequence[Mapping[str, Any]], on_delta: Callable[[str], None], ) -> ModelReply | Mapping[str, Any]
- ContextPolicy · class · L20-L21 — class ContextPolicy(Protocol)
- prepare · method · L21-L21 — def prepare(self, state: RunState) -> Sequence[Mapping[str, Any]]
- ActionExecutor · class · L24-L27 — class ActionExecutor(Protocol)
- execute · method · L25-L27 — def execute( self, action: Action | None, reply: ModelReply, state: RunState ) -> ExecutionOutcome
- EventSink · class · L30-L31 — class EventSink(Protocol)
- emit · method · L31-L31 — def emit(self, event: AgentEvent) -> None
- CancellationPort · class · L34-L35 — class CancellationPort(Protocol)
- cancelled · method · L35-L35 — def cancelled(self) -> bool
- CompletionPort · class · L38-L39 — class CompletionPort(Protocol)
- completion · method · L39-L39 — def completion(self) -> Any
- ReplyInterceptor · class · L42-L45 — class ReplyInterceptor(Protocol)
- intercept · method · L43-L45 — def intercept( self, reply: ModelReply, state: RunState ) -> ModelReply | Mapping[str, Any] | None
- PassthroughContext · class · L48-L50 — class PassthroughContext
- prepare · method · L49-L50 — def prepare(self, state: RunState) -> Sequence[Mapping[str, Any]]
- NullEventSink · class · L53-L55 — class NullEventSink
- emit · method · L54-L55 — def emit(self, event: AgentEvent) -> None
- NeverCancelled · class · L58-L60 — class NeverCancelled
- cancelled · method · L59-L60 — def cancelled(self) -> bool
- NoCompletion · class · L63-L65 — class NoCompletion
- completion · method · L64-L65 — def completion(self) -> None
- IdentityReplyInterceptor · class · L68-L71 — class IdentityReplyInterceptor
- intercept · method · L69-L71 — def intercept(self, reply: ModelReply, state: RunState) -> ModelReply