Type Alias: BeforeLLMHook
type BeforeLLMHook = (context) =>
| void
| BeforeLLMHookResult
| Promise<void | BeforeLLMHookResult>;
Defined in: hooks/types.ts:157
Hook called before LLM call.
Can be used for:
- Prompt transformation/injection
- Tool filtering
- Request logging
- Caching checks
Parameters
| Parameter | Type |
|---|---|
context | LLMHookContext |
Returns
| void | BeforeLLMHookResult | Promise<void | BeforeLLMHookResult>
void to proceed unchanged, or modified messages/tools