Contents

tokenCount(for:)

Returns the token count for the specified instructions.

Declaration

nonisolated(nonsending) final func tokenCount(for instructions: Instructions) async throws -> Int

Parameters

  • instructions:

    The instructions to calculate the token count for.

Return Value

The token count for the instructions.