InferenceChat class
Constructors
-
InferenceChat.new({required Future<
InferenceModelSession> sessionCreator()?, required int maxTokens, int tokenBuffer = 2000, bool supportImage = false, bool supportsFunctionCalls = false, List<Tool> tools = const [], ModelType modelType = ModelType.gemmaIt, bool isThinking = false, ModelFileType fileType = ModelFileType.task})
Properties
- fileType → ModelFileType
-
final
-
fullHistory
→ List<
Message> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageMessageCount → int
-
no setter
- isThinking → bool
-
final
- maxTokens → int
-
final
- modelType → ModelType
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session ↔ InferenceModelSession
-
getter/setter pair
-
sessionCreator
→ Future<
InferenceModelSession> Function()? -
final
- supportImage → bool
-
final
- supportsFunctionCalls → bool
-
final
- supportsImages → bool
-
no setter
- tokenBuffer → int
-
final
-
tools
→ List<
Tool> -
final
Methods
-
addQuery(
Message message) → Future< void> -
addQueryChunk(
Message message, [bool noTool = false]) → Future< void> -
clearHistory(
{List< Message> ? replayHistory}) → Future<void> -
generateChatResponse(
) → Future< ModelResponse> -
generateChatResponseAsync(
) → Stream< ModelResponse> -
initSession(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stopGeneration(
) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited