ModelInfo constructor
ModelInfo({
- required String id,
- required String name,
- required ModelCategory category,
- required ModelFormat format,
- required InferenceFramework framework,
- Uri? downloadURL,
- Uri? localPath,
- ModelArtifactType? artifactType,
- int? downloadSize,
- int? contextLength,
- bool supportsThinking = false,
- ThinkingTagPattern? thinkingPattern,
- String? description,
- ModelSource? source,
- DateTime? createdAt,
- DateTime? updatedAt,
Implementation
ModelInfo({
required this.id,
required this.name,
required this.category,
required this.format,
required this.framework,
this.downloadURL,
this.localPath,
ModelArtifactType? artifactType,
this.downloadSize,
int? contextLength,
bool supportsThinking = false,
ThinkingTagPattern? thinkingPattern,
this.description,
ModelSource? source,
DateTime? createdAt,
DateTime? updatedAt,
}) : artifactType =
artifactType ?? ModelArtifactType.infer(downloadURL, format),
contextLength = category.requiresContextLength
? (contextLength ?? 2048)
: contextLength,
supportsThinking = category.supportsThinking ? supportsThinking : false,
thinkingPattern = (category.supportsThinking && supportsThinking)
? (thinkingPattern ?? ThinkingTagPattern.defaultPattern)
: null,
source = source ?? ModelSource.remote,
createdAt = createdAt ?? DateTime.now(),
updatedAt = updatedAt ?? DateTime.now();