copyWith method

ModelInfo copyWith({
  1. String? id,
  2. String? name,
  3. ModelCategory? category,
  4. ModelFormat? format,
  5. InferenceFramework? framework,
  6. Uri? downloadURL,
  7. Uri? localPath,
  8. ModelArtifactType? artifactType,
  9. int? downloadSize,
  10. int? contextLength,
  11. bool? supportsThinking,
  12. ThinkingTagPattern? thinkingPattern,
  13. String? description,
  14. ModelSource? source,
  15. DateTime? createdAt,
  16. DateTime? updatedAt,
})

Copy with modifications

Implementation

ModelInfo copyWith({
  String? id,
  String? name,
  ModelCategory? category,
  ModelFormat? format,
  InferenceFramework? framework,
  Uri? downloadURL,
  Uri? localPath,
  ModelArtifactType? artifactType,
  int? downloadSize,
  int? contextLength,
  bool? supportsThinking,
  ThinkingTagPattern? thinkingPattern,
  String? description,
  ModelSource? source,
  DateTime? createdAt,
  DateTime? updatedAt,
}) {
  return ModelInfo(
    id: id ?? this.id,
    name: name ?? this.name,
    category: category ?? this.category,
    format: format ?? this.format,
    framework: framework ?? this.framework,
    downloadURL: downloadURL ?? this.downloadURL,
    localPath: localPath ?? this.localPath,
    artifactType: artifactType ?? this.artifactType,
    downloadSize: downloadSize ?? this.downloadSize,
    contextLength: contextLength ?? this.contextLength,
    supportsThinking: supportsThinking ?? this.supportsThinking,
    thinkingPattern: thinkingPattern ?? this.thinkingPattern,
    description: description ?? this.description,
    source: source ?? this.source,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}