tweak: adjust plugin api to accept 'small' as an input for chat.headers hook
This commit is contained in:
parent
cea7b7e182
commit
f8232986d6
2 changed files with 9 additions and 1 deletions
|
|
@ -155,6 +155,7 @@ export namespace LLM {
|
|||
model: input.model,
|
||||
provider,
|
||||
message: input.user,
|
||||
small: input.small === true,
|
||||
},
|
||||
{
|
||||
headers: {},
|
||||
|
|
|
|||
|
|
@ -187,7 +187,14 @@ export interface Hooks {
|
|||
output: { temperature: number; topP: number; topK: number; options: Record<string, any> },
|
||||
) => Promise<void>
|
||||
"chat.headers"?: (
|
||||
input: { sessionID: string; agent: string; model: Model; provider: ProviderContext; message: UserMessage },
|
||||
input: {
|
||||
sessionID: string
|
||||
agent: string
|
||||
model: Model
|
||||
provider: ProviderContext
|
||||
message: UserMessage
|
||||
small: boolean
|
||||
},
|
||||
output: { headers: Record<string, string> },
|
||||
) => Promise<void>
|
||||
"permission.ask"?: (input: Permission, output: { status: "ask" | "deny" | "allow" }) => Promise<void>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue