fromValue static method

Implementation

static LiteRtLmSpeculativeDecodingMode fromValue(int value) =>
    switch (value) {
      0 => kLiteRtLmSpeculativeDecodingModeOff,
      1 => kLiteRtLmSpeculativeDecodingModeOn,
      2 => kLiteRtLmSpeculativeDecodingModeAdaptive,
      _ => throw ArgumentError(
        'Unknown value for LiteRtLmSpeculativeDecodingMode: $value',
      ),
    };