BackendNativeChatGeneration class abstract

Optional backend capability for native structured chat generation.

Backends that implement this can receive chat messages and tools directly instead of only receiving the already-rendered prompt string. Callers should check supportsNativeChatGeneration before invoking generateChat.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsNativeChatGeneration bool
Whether the active backend/runtime can use native structured chat input.
no setter

Methods

generateChat(int contextHandle, List<LlamaChatMessage> messages, GenerationParams params, {List<ToolDefinition>? tools, ToolChoice toolChoice = ToolChoice.auto, bool parallelToolCalls = false, bool enableThinking = true, Map<String, dynamic>? chatTemplateKwargs, String? sourceLangCode, String? targetLangCode, DateTime? templateNow}) Stream<List<int>>
Generates from structured chat state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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