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 +4 -4
- data/lib/llamafile/version.rb +1 -1
- data/lib/llamafile.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f65be502a0aaa502ab94785114d66f057e9af629cda650851a39c73d3b78c97
|
4
|
+
data.tar.gz: 376add4a170db17299c3e11b1f2cc20313433894c1264c1ee729827b240ec08d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13ccc9565d30515cafe42c61ee8e32c270e89399d1189b0f834285f277f70e31351b8ff0fdcdcacec0b5f78f16960768115918a4f3ee60ad92a03e16fda94e74
|
7
|
+
data.tar.gz: 3ef5540c172c6bdb6b021b20bfa0cbba2420f70059903a9961eb83586aaf2ae91ed069101d6b92100de396313825cbf8f4a767a79ff0b6b547ac430bba90b7f1
|
data/lib/llamafile/version.rb
CHANGED
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
|
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
|
-
|
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
|