BackendJsonSchemaChatGeneration class abstract

Optional, bounded JSON-Schema text-chat capability, separate from GBNF.

Admission may initialize the loaded model and must construct its provider; symbol presence alone is not model support. The route accepts the JSON Schema subset that both the llama.cpp GBNF converter and the native provider enforce, and refuses anything else before generation. Tools, media, caller stops and speculative decoding are excluded; thinking is excluded unless the backend also implements BackendJsonSchemaThinkingChatGeneration and admits it for the model.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsJsonSchemaChatGeneration → bool
True only after successful provider admission for the loaded model.
no setter

Methods

generateChatWithJsonSchema(int contextHandle, List<LlamaChatMessage> messages, GenerationParams params, {required Map<String, dynamic> jsonSchema, Map<String, dynamic>? chatTemplateKwargs, DateTime? templateNow}) → Stream<List<int>>
Streams schema-constrained text chat with thinking explicitly disabled.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareJsonSchemaChat() → Future<void>
Admits the loaded model or throws a typed unsupported/runtime error.
toString() → String
A string representation of this object.
inherited

Operators

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