class Llama::Chat

Overview

Transactional conversation history over a reusable Session.

Included Modules

Defined in:

llama/chat.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(model : Model, system : String | Nil = nil, template : String | Nil = nil, context_options : ContextOptions = ContextOptions.new) #

[View source]

Instance Method Detail

def ask(content : String, options : GenerationOptions = GenerationOptions.new, commit_partial : Bool = false, &block : GenerationChunk -> ) : Generation #

[View source]
def ask(content : String, options : GenerationOptions = GenerationOptions.new, commit_partial : Bool = false) : Generation #

[View source]
def clear : Nil #

[View source]
def close : Nil #

[View source]
def closed? : Bool #

[View source]
def finalize #

[View source]
def free : Nil #

[View source]
def history : Array(Message) #

[View source]
def to_unsafe #

[View source]