---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/type-aliases/RawGenerationObserverFn.md
description: >-
  Observe a battery's raw model output for one completed generation. Injectable
  + defaulted to absent on the on-device LLM batteries (transformers.js,
  LiteRT-LM), mirroring the `toolCallParser` / `reasoningParser` /
  `extractMediaOutputs` injection seams. Fired once per terminal generation,
  after parsing and before persistence; purely observational (return value
  ignored, errors swallowed).
---

# Type Alias: RawGenerationObserverFn

```ts
type RawGenerationObserverFn = (observation: RawGenerationObservation) => void;
```

Defined in: [src/batteries/llm/chat\_common/types.ts:374](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L374)

Observe a battery's raw model output for one completed generation. Injectable + defaulted to absent
on the on-device LLM batteries (transformers.js, LiteRT-LM), mirroring the `toolCallParser` /
`reasoningParser` / `extractMediaOutputs` injection seams. Fired once per terminal generation, after
parsing and before persistence; purely observational (return value ignored, errors swallowed).

## Parameters

| Parameter     | Type                                                                    |
| ------------- | ----------------------------------------------------------------------- |
| `observation` | [`RawGenerationObservation`](../interfaces/RawGenerationObservation.md) |

## Returns

`void`
