# Type Alias SingleAfterModelCallback

SingleAfterModelCallback: (
params: { context: Context; response: LlmResponse },
) => LlmResponse | undefined | Promise<LlmResponse | undefined>

A callback that runs after a response is received from the model.

#### Type Declaration

- - (
    params: { context: Context; response: LlmResponse },
    ): LlmResponse | undefined | Promise<LlmResponse | undefined>

  - #### Parameters

    - params: { context: Context; response: LlmResponse }

      - ##### context: Context

        The current callback context.

      - ##### response: LlmResponse

        The actual model response.

    #### Returns LlmResponse | undefined | Promise<LlmResponse | undefined>

    The content to return to the user. When present, the actual model response will be ignored and the provided content will be returned to user.

- Defined in agents/llm_agent.ts:112