createSessionForId method

Future<void> createSessionForId({
  1. required int sessionId,
  2. required double temperature,
  3. required int randomSeed,
  4. required int topK,
  5. double? topP,
  6. String? loraPath,
  7. bool? enableVisionModality,
  8. bool? enableAudioModality,
  9. String? systemInstruction,
  10. bool? enableThinking,
})

Implementation

Future<void> createSessionForId({required int sessionId, required double temperature, required int randomSeed, required int topK, double? topP, String? loraPath, bool? enableVisionModality, bool? enableAudioModality, String? systemInstruction, bool? enableThinking, }) async {
  final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_gemma.PlatformService.createSessionForId$pigeonVar_messageChannelSuffix';
  final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
    pigeonVar_channelName,
    pigeonChannelCodec,
    binaryMessenger: pigeonVar_binaryMessenger,
  );
  final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[sessionId, temperature, randomSeed, topK, topP, loraPath, enableVisionModality, enableAudioModality, systemInstruction, enableThinking]);
  final List<Object?>? pigeonVar_replyList =
      await pigeonVar_sendFuture as List<Object?>?;
  if (pigeonVar_replyList == null) {
    throw _createConnectionError(pigeonVar_channelName);
  } else if (pigeonVar_replyList.length > 1) {
    throw PlatformException(
      code: pigeonVar_replyList[0]! as String,
      message: pigeonVar_replyList[1] as String?,
      details: pigeonVar_replyList[2],
    );
  } else {
    return;
  }
}