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