struct Llama::GenerationChunk

Overview

A unit of text delivery, not necessarily a one-to-one token event. #token is the most recent sampled token that triggered delivery, and #index is a monotonically increasing emission index (including flushes).

Defined in:

llama/result.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(text : String, token : Token, index : Int32) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(text _text = @text, token _token = @token, index _index = @index) #

[View source]
def index : Int32 #

def text : String #

def token : Token #