awrap_model_call(
self,
request: ModelRequest[ContextT],
handler: Callable[[ModelRequest[| Name | Type | Description |
|---|---|---|
request* | ModelRequest[ContextT] | Model request to execute (includes state and runtime). |
handler* | Callable[[ModelRequest[ContextT]], Awaitable[ModelResponse[ResponseT]]] |
Apply context edits before invoking the model via handler.
Async callback that executes the model request and returns
ModelResponse.