llamafile 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd2f077f1692c00a61954000c64dc038004e24fe0df98c4a440316516e0d9a4a
4
- data.tar.gz: 7a2dbf3c9191d974fea4fe1f0c2d8c51d35a01bd0c9a48b0adf5d5331e8aa0dc
3
+ metadata.gz: 295177829207b13581e69ece13468ce5abe9ddbceb1f52ea05354197f0100673
4
+ data.tar.gz: 407b12b5a72d7319d3dd073922cebc30974d8d0faa35dcae19c9abf9bbcd85fa
5
5
  SHA512:
6
- metadata.gz: 96777f7209ab075189c7f01218a852d73d33c5bb218eb015e8ef9958024a3f371051d3cfc0effab4cdd588a060177cfb599becc7fa61eea94f05139ea4b55094
7
- data.tar.gz: 834d4b313d6894b3c612cc2bd696d34d2d719bffa8eca6c6391ccae0b7a974e6c2c620052c8d2e3167cef2aaa4e71811c63661fc3e2cee4a2025f23f46963d46
6
+ metadata.gz: eab5a56d378e6a75cb948c3ed1677ecda1e353afa0d42960e32d0184ec395b421a28386ebeb0d193b2707bbfbcbcaf87e8222c7b378be7e2060dc4105e151650
7
+ data.tar.gz: 4ae8ddbf387bf73875d882053c4b7380c5c6094b2f667c0d75fe3d54dd397ecea5822d461443abb67fea1378778af9f45f63959283b7c9f053131ac5d5996a94
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Llamafile
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
data/lib/llamafile.rb CHANGED
@@ -82,7 +82,7 @@ module Lf
82
82
 
83
83
  @@TMPL = {
84
84
  bool: %[AI is <%= Lf.inspector %>\nUser: Does "<%= @output %>" <%= @condition %> "<%= @input %>"\nAI: ],
85
- string: %[AI is <%= Lf.character %>\nUser: <%= [@query].flatten.join("\n") %>\nAI: ],
85
+ string: %[AI is <%= Lf.character %>\nUser: <%= [@input].flatten.join("\n") %>\nAI: ],
86
86
  }
87
87
  def self.template
88
88
  @@TMPL
@@ -98,7 +98,7 @@ module Lf
98
98
  @condition = condition
99
99
  LLAMA.post(n_predict: 4, grammar: @@GRAM[:bool], prompt: Lf.erb(Lf.template[:bool])) == 'yes';
100
100
  end
101
- def self.prompt input
101
+ def self.prompt *input
102
102
  @input = input
103
103
  LLAMA.post(grammar: @@GRAM[:string], prompt: Lf.erb(Lf.template[:string]));
104
104
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llamafile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Olson