Sampler constructor

const Sampler({
  1. required double temperature,
  2. required int topK,
  3. required double topP,
  4. required int randomSeed,
})

Implementation

const Sampler({
  required this.temperature,
  required this.topK,
  required this.topP,
  required this.randomSeed,
}) : assert(temperature >= 0 && temperature < double.infinity),
     assert(topK >= 1),
     assert(topP > 0 && topP <= 1);