Property PreferredInferenceModality
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
PreferredInferenceModality
Gets or sets the preferred modality for inference. This determines whether text, image, or both modalities are used when processing input. Defaults to Multimodal.
public InferenceModality PreferredInferenceModality { get; set; }
Property Value
Examples
using LMKit.Model;
using LMKit.TextAnalysis;
using LMKit.Inference;
using LMKit.Data;
using System;
using System.Collections.Generic;
LM model = LM.LoadFromModelID("lmkit-tasks:4b-preview");
Categorization categorizer = new Categorization(model);
// Force text-only processing even for multimodal input
categorizer.PreferredInferenceModality = InferenceModality.Text;
var categories = new List<string> { "invoice", "receipt", "contract" };
var document = new Attachment("document.pdf");
int index = categorizer.GetBestCategory(categories, document);
Console.WriteLine($"Document type: {categories[index]}");