RuntimeConfig constructor
const
RuntimeConfig({
- required int maxTokens,
- required String modelPath,
- String? tokenizerPath,
- PreferredBackend? preferredBackend,
- bool supportImage = false,
- bool supportAudio = false,
- int? maxNumImages,
- bool? enableSpeculativeDecoding,
- int? maxConcurrentSessions,
- List<
int> ? loraRanks, - Map<
String, String> ? artifactPaths,
Implementation
const RuntimeConfig({
required this.maxTokens,
required this.modelPath,
this.tokenizerPath,
this.preferredBackend,
this.supportImage = false,
this.supportAudio = false,
this.maxNumImages,
this.enableSpeculativeDecoding,
this.maxConcurrentSessions,
this.loraRanks,
this.artifactPaths,
}) : assert(maxTokens >= 0, 'maxTokens must not be negative'),
assert(
maxNumImages == null || maxNumImages >= 0,
'maxNumImages must not be negative',
),
assert(
maxConcurrentSessions == null || maxConcurrentSessions > 0,
'maxConcurrentSessions must be positive when set',
);