feat(plugin): wrap native session HTTP
This commit is contained in:
parent
a21598901d
commit
4dc5ba66d8
13 changed files with 223 additions and 96 deletions
2
packages/www/content/docs/build/plugins.mdx
vendored
2
packages/www/content/docs/build/plugins.mdx
vendored
|
|
@ -247,7 +247,7 @@ mutable fields:
|
|||
| `ctx.aisdk.hook("sdk", callback)` | `sdk`, after inspecting `model`, `package`, and `options` |
|
||||
| `ctx.aisdk.hook("language", callback)` | `language`, after inspecting `model`, `sdk`, and `options` |
|
||||
| `ctx.session.hook("context", callback)` | `system`, `messages`, and the `tools` record immediately before model dispatch |
|
||||
| `ctx.session.hook("http", callback)` | `url`, `headers`, and `body` before the model request is sent |
|
||||
| `ctx.session.hook("http", callback)` | `request`, wrapping the model's HTTP request and response |
|
||||
| `ctx.tool.hook("execute.before", callback)` | `input`, before the selected tool executes |
|
||||
| `ctx.tool.hook("execute.after", callback)` | Terminal `result` on success or `error` on failure |
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue