ModelLoadRequest constructor
ModelLoadRequest({
- String? modelId,
- ModelCategory? category,
- InferenceFramework? framework,
- bool? forceReload,
- bool? validateAvailability,
- int? contextLength,
- bool? useGpu,
- Iterable<
InferenceFramework> ? backendPreferences, - AcceleratorPolicy? acceleratorPolicy,
Implementation
factory ModelLoadRequest({
$core.String? modelId,
ModelCategory? category,
InferenceFramework? framework,
$core.bool? forceReload,
$core.bool? validateAvailability,
$core.int? contextLength,
$core.bool? useGpu,
$core.Iterable<InferenceFramework>? backendPreferences,
AcceleratorPolicy? acceleratorPolicy,
}) {
final result = create();
if (modelId != null) result.modelId = modelId;
if (category != null) result.category = category;
if (framework != null) result.framework = framework;
if (forceReload != null) result.forceReload = forceReload;
if (validateAvailability != null)
result.validateAvailability = validateAvailability;
if (contextLength != null) result.contextLength = contextLength;
if (useGpu != null) result.useGpu = useGpu;
if (backendPreferences != null)
result.backendPreferences.addAll(backendPreferences);
if (acceleratorPolicy != null) result.acceleratorPolicy = acceleratorPolicy;
return result;
}