Why?
Because sometimes local llamafile interactions on local hardware with local data is the only option.
BEFORE
- wget -O llamafile
- chmod +x llamafile
- sudo mv lamafile /usr/bin/llama
Installation
bundle
bundle add llamafile
gems
gem install llamafile
Usage
module
Pass a raw string to the module and
Llamafile.llama("What is the meaning of life?") => "42."
Llamafile << "How can we achieve world peace?" => "I don't know."
include
class X
include Llamafile
def initialize k
@id = k
@db = My.data[k]
end
def hello
llama(%[Hello, World!])
end
end