createSession method
Future<void>
createSession({
- required int sessionId,
- required double temperature,
- required int topK,
- double? topP,
- int? maxOutputTokens,
- String? systemInstruction,
- List<
LocalAiTool> ? tools,
override
Implementation
@override
Future<void> createSession({
required int sessionId,
required double temperature,
required int topK,
double? topP,
int? maxOutputTokens,
String? systemInstruction,
List<LocalAiTool>? tools,
}) async {
calls.add('createSession');
final error = createSessionError;
if (error != null) throw error;
sessions.add(
FakeLocalAiSession(
id: sessionId,
temperature: temperature,
topK: topK,
topP: topP,
maxOutputTokens: maxOutputTokens,
systemInstruction: systemInstruction,
toolNames: [for (final tool in tools ?? const []) tool.name],
),
);
}