fromValue static method

LiteRtLmSamplerType fromValue(
  1. int value
)

Implementation

static LiteRtLmSamplerType fromValue(int value) => switch (value) {
  0 => kLiteRtLmSamplerTypeUnspecified,
  1 => kLiteRtLmSamplerTypeTopK,
  2 => kLiteRtLmSamplerTypeTopP,
  3 => kLiteRtLmSamplerTypeGreedy,
  _ => throw ArgumentError('Unknown value for LiteRtLmSamplerType: $value'),
};