ADK for TypeScript: API Reference
    Preparing search index...

    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

        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.