# `LLMProxy.GuardrailPipeline`
[🔗](https://github.com/elixir-vibe/llm_proxy/blob/v0.3.1/lib/llm_proxy/guardrail_pipeline.ex#L1)

Runs configured `LLMProxy.Guardrail` callbacks around requests, responses, and stream events.

# `after_response`

```elixir
@spec after_response(LLMProxy.Response.t(), LLMProxy.Guardrail.context()) ::
  {:ok, LLMProxy.Response.t()} | {:error, term()}
```

# `before_request`

```elixir
@spec before_request(LLMProxy.Protocol.Request.t(), LLMProxy.Guardrail.context()) ::
  {:ok, LLMProxy.Protocol.Request.t()} | {:error, term()}
```

# `on_stream_event`

```elixir
@spec on_stream_event(LLMProxy.Stream.Event.t(), LLMProxy.Guardrail.context()) ::
  {:ok, LLMProxy.Stream.Event.t() | nil} | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
