llamafile 0.2.0 → 0.2.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: aa8d8b3b005c7f195b14adc3c06a6779302862704942399a8d622a0ab82d86c4
4
- data.tar.gz: caa2a7f2c3d092b402c37a352f85aed52d1a47472d4a32685f7a0a7bdd4bcdf0
3
+ metadata.gz: 8f65be502a0aaa502ab94785114d66f057e9af629cda650851a39c73d3b78c97
4
+ data.tar.gz: 376add4a170db17299c3e11b1f2cc20313433894c1264c1ee729827b240ec08d
5
5
  SHA512:
6
- metadata.gz: 0fd5a0a86e10c80de170d2c4c4bed938036ac317ab9f866080a5c971a035605d38c9e22b711de2e53ea5c6ef7331c61d0b3a1a2d9dd58b943c0dd8451e53ab10
7
- data.tar.gz: 75af1fe10bbf5224e76aeda87ff15db852fdbbd43e8f4ef9c9933a36f81593f99763172460720b7ced9f8583a0f343e4354d47a5d088fd5c5b9d864a3e97f8cc
6
+ metadata.gz: 13ccc9565d30515cafe42c61ee8e32c270e89399d1189b0f834285f277f70e31351b8ff0fdcdcacec0b5f78f16960768115918a4f3ee60ad92a03e16fda94e74
7
+ data.tar.gz: 3ef5540c172c6bdb6b021b20bfa0cbba2420f70059903a9961eb83586aaf2ae91ed069101d6b92100de396313825cbf8f4a767a79ff0b6b547ac430bba90b7f1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Llamafile
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/llamafile.rb CHANGED
@@ -33,9 +33,12 @@ module Lf
33
33
  @example = %[# this is a heading\nThis is some general text about the heading.\n1. list item one.\n2. list item two.\n3. list item three.]
34
34
  @convo = []
35
35
  end
36
- def pre q, a
36
+ def fact q, a
37
37
  @convo << [ q, a ]
38
38
  end
39
+ def hist
40
+ @convo
41
+ end
39
42
  def convo
40
43
  o = []; @convo[-5..-1].each { |e| o << %[User: #{e[0]}\nLlama: #{e[1]}] };
41
44
  return o.join("\n\n")
@@ -48,8 +51,10 @@ module Lf
48
51
  end
49
52
  def chain *p
50
53
  [p].flatten.compact.each { |e|
51
- @convo << [ i, Lf.prompt(output: prompt, input: i)]
54
+ puts %[<-- #{e}]
55
+ @convo << [ e, Lf.prompt(output: prompt, input: e)]
52
56
  @output = @convo[-1][1]
57
+ puts %[--> #{@output}]
53
58
  @input = e
54
59
  }
55
60
  return @output
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Olson