createModel abstract method
Creates and returns a new InferenceModel instance.
modelType
— model type to create.
maxTokens
— maximum context length for the model.
preferredBackend
— backend preference (e.g., CPU, GPU).
loraRanks
— optional supported LoRA ranks.
maxNumImages
— maximum number of images (for multimodal models).
supportImage
— whether the model supports images.
Implementation
Future<InferenceModel> createModel({
required ModelType modelType,
int maxTokens = 1024,
PreferredBackend? preferredBackend,
List<int>? loraRanks,
int? maxNumImages, // Добавляем поддержку изображений
bool supportImage = false, // Добавляем флаг поддержки изображений
});