BackendChatPromptGeneration class abstract

Optional backend capability for a prompt that LlamaEngine.create rendered from chat messages with media parts, as opposed to a prompt the caller of LlamaEngine.generate wrote.

A backend that reads media placeholders in the prompt of LlamaBackend.generate (<__media__>, <image>, <img> and the like) would also read one that a chat message only quotes. With this interface the engine hands such a backend the rendered prompt apart from a caller's. Without it the engine passes the prompt to LlamaBackend.generate with <__media__> where each part was and a zero-width space (U+200B) after the first character of every other placeholder string.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateChatPrompt(int contextHandle, String prompt, GenerationParams params, {required String mediaMarker, List<LlamaContentPart>? parts}) → Stream<List<int>>
Generates like LlamaBackend.generate from the chat-rendered prompt.
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