refactor(plugin): rename session HTTP hook
This commit is contained in:
parent
3a7f507135
commit
a21598901d
6 changed files with 13 additions and 12 deletions
|
|
@ -225,7 +225,7 @@ export const OpenAIPlugin = define({
|
|||
})
|
||||
}
|
||||
})
|
||||
yield* ctx.session.hook("request", (evt) =>
|
||||
yield* ctx.session.hook("http", (evt) =>
|
||||
Effect.sync(() => {
|
||||
if (!chatgpt || evt.model.providerID !== Provider.ID.openai) return
|
||||
const url = new URL(evt.url)
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ export const layer = Layer.effect(
|
|||
const options: StreamOptions = {
|
||||
transform: (request) =>
|
||||
hooks
|
||||
.trigger("session", "request", {
|
||||
.trigger("session", "http", {
|
||||
sessionID: session.id,
|
||||
agent: agent.id,
|
||||
model: resolved.ref,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue