Contents

updateUsage(input:output:metadata:)

Creates an action that replaces the entry’s token-usage totals.

Declaration

static func updateUsage(input: LanguageModelExecutorGenerationChannel.Usage.Input, output: LanguageModelExecutorGenerationChannel.Usage.Output, metadata: [String : any ConvertibleToGeneratedContent] = [:]) -> LanguageModelExecutorGenerationChannel.Reasoning.Action

Parameters

  • input:

    The token counts for the transcript submitted to the model.

  • output:

    The token counts for the response the model produces.

  • metadata:

    Additional metadata to record alongside the token counts.

See Also

Reasoning actions