GuardrailContext
Context passed to Guardrail.check alongside the text to filter.
Defined in: src/core/types/guardrails.ts:57
Context passed to Guardrail.check alongside the text to filter.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
accumulated | string | All raw LLM text produced for this utterance so far. Remarks At the 'final' stage this is the complete response. At the 'chunk' stage it includes the segment currently being filtered plus everything that preceded it, which lets a guardrail reason about context it has already let through. | src/core/types/guardrails.ts:70 |
messages | readonly LLMMessage[] | Conversation history at the time of the call, oldest first. Remarks Read-only. Mutating it has no effect on the pipeline. | src/core/types/guardrails.ts:78 |
signal? | AbortSignal | Signal for the in-flight generation. Remarks Aborted on barge-in or eager-pipeline cancellation. Guardrails that call a network moderation API should forward this to fetch so the request is cancelled when the user interrupts. | src/core/types/guardrails.ts:88 |
stage | GuardrailStage | Which pipeline point this call is running at. | src/core/types/guardrails.ts:59 |