createConversationWithDefault function

Future<Conversation> createConversationWithDefault(
  1. Engine engine,
  2. ConversationConfig config,
  3. SamplerConfig? defaultSamplerConfig
)

Engine.createConversation with the model's own sampler default when the config sets none: the values flutter_edge_ai_litertlm resolves (the file's sampler, then the family's published defaults, then the fallback), which never count as the caller's choice (LiteRT-LM#2080's one-time warning fires only for a sampler the caller set). Null takes the file's sampler, then 0.8 / 40 / 0.95 / seed 1.

Implementation

Future<Conversation> createConversationWithDefault(
  Engine engine,
  ConversationConfig config,
  SamplerConfig? defaultSamplerConfig,
) => engine._createConversation(
  config,
  own: engine._backing == OpenSessionBacking.native,
  defaultSamplerConfig: defaultSamplerConfig,
);