createSession method
Future<String>
createSession({
- String? systemInstruction,
- List<
OnDeviceAiTool> ? tools, - GenerationConfig? config,
override
Creates a conversation and returns its id.
tools is non-null only when the backend reported native tool calling.
Implementation
@override
Future<String> createSession({
String? systemInstruction,
List<OnDeviceAiTool>? tools,
GenerationConfig? config,
}) async {
final id = 'web_${++_counter}';
_sessions[id] = _WebSession(systemInstruction, config);
return id;
}