InferenceChat constructor
InferenceChat({
- required Future<
InferenceModelSession> sessionCreator()?, - required int maxTokens,
- int tokenBuffer = 2000,
- bool supportImage = false,
- bool supportAudio = false,
- bool supportsFunctionCalls = false,
- List<
Tool> tools = const [], - ModelType modelType = ModelType.gemmaIt,
- bool isThinking = false,
- ModelFileType fileType = ModelFileType.task,
- ToolChoice toolChoice = ToolChoice.auto,
- String? systemInstruction,
Implementation
InferenceChat({
required this.sessionCreator,
required this.maxTokens,
this.tokenBuffer = 2000,
this.supportImage = false,
this.supportAudio = false,
this.supportsFunctionCalls = false,
this.tools = const [],
this.modelType =
ModelType.gemmaIt, // Default to gemmaIt for backward compatibility
this.isThinking = false, // Default to false for backward compatibility
this.fileType =
ModelFileType.task, // Default to task for backward compatibility
this.toolChoice =
ToolChoice.auto, // Default to auto for backward compatibility
String?
systemInstruction, // kept for API compatibility, forwarded to session via sessionCreator
});