createSession abstract method
Creates a new InferenceModelSession for generation.
temperature, randomSeed, topK, topP — parameters for sampling.
loraPath — optional path to LoRA model.
enableVisionModality — enable vision modality for multimodal models.
enableAudioModality — enable audio modality for Gemma 3n E4B models.
Implementation
Future<InferenceModelSession> createSession({
double temperature = .8,
int randomSeed = 1,
int topK = 1,
double? topP,
String? loraPath,
bool? enableVisionModality, // Add vision modality support
bool? enableAudioModality, // Add audio modality support (Gemma 3n E4B)
});