FakeLocalAiSession class

One session the fake was asked to create, and everything sent to it.

Assert against this rather than against call strings: it survives a rename, and it says what the code under test actually did.

Constructors

FakeLocalAiSession({required int id, required double temperature, required int topK, double? topP, int? maxOutputTokens, String? systemInstruction, List<String> toolNames = const []})

Properties

closed bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int
final
images List<Uint8List>
Everything addImage appended, in order.
final
lastOverrides LocalAiGenerationOverrides?
Sampling the most recent generate call on this session carried, or null when it inherited the session's own.
getter/setter pair
lastSchemaJson String?
The schema the most recent structured call carried, as raw JSON.
getter/setter pair
maxOutputTokens int?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
systemInstruction String?
final
temperature double
final
toolNames List<String>
final
topK int
final
topP double?
final
transcript StringBuffer
Everything addQueryChunk appended, in order.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited