VLMGenerationOptions constructor

VLMGenerationOptions({
  1. String? prompt,
  2. int? maxTokens,
  3. double? temperature,
  4. double? topP,
  5. int? topK,
  6. Iterable<String>? stopSequences,
  7. bool? streamingEnabled,
  8. String? systemPrompt,
  9. int? maxImageSize,
  10. int? nThreads,
  11. bool? useGpu,
  12. VLMModelFamily? modelFamily,
  13. VLMChatTemplate? customChatTemplate,
  14. String? imageMarkerOverride,
  15. Int64? seed,
  16. double? repetitionPenalty,
  17. double? minP,
  18. bool? emitImageEmbeddings,
})

Implementation

factory VLMGenerationOptions({
  $core.String? prompt,
  $core.int? maxTokens,
  $core.double? temperature,
  $core.double? topP,
  $core.int? topK,
  $core.Iterable<$core.String>? stopSequences,
  $core.bool? streamingEnabled,
  $core.String? systemPrompt,
  $core.int? maxImageSize,
  $core.int? nThreads,
  $core.bool? useGpu,
  VLMModelFamily? modelFamily,
  VLMChatTemplate? customChatTemplate,
  $core.String? imageMarkerOverride,
  $fixnum.Int64? seed,
  $core.double? repetitionPenalty,
  $core.double? minP,
  $core.bool? emitImageEmbeddings,
}) {
  final result = create();
  if (prompt != null) result.prompt = prompt;
  if (maxTokens != null) result.maxTokens = maxTokens;
  if (temperature != null) result.temperature = temperature;
  if (topP != null) result.topP = topP;
  if (topK != null) result.topK = topK;
  if (stopSequences != null) result.stopSequences.addAll(stopSequences);
  if (streamingEnabled != null) result.streamingEnabled = streamingEnabled;
  if (systemPrompt != null) result.systemPrompt = systemPrompt;
  if (maxImageSize != null) result.maxImageSize = maxImageSize;
  if (nThreads != null) result.nThreads = nThreads;
  if (useGpu != null) result.useGpu = useGpu;
  if (modelFamily != null) result.modelFamily = modelFamily;
  if (customChatTemplate != null)
    result.customChatTemplate = customChatTemplate;
  if (imageMarkerOverride != null)
    result.imageMarkerOverride = imageMarkerOverride;
  if (seed != null) result.seed = seed;
  if (repetitionPenalty != null) result.repetitionPenalty = repetitionPenalty;
  if (minP != null) result.minP = minP;
  if (emitImageEmbeddings != null)
    result.emitImageEmbeddings = emitImageEmbeddings;
  return result;
}