simple_rag 0.1.2 → 0.1.3
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/simple_rag/index.rb +5 -7
- data/lib/simple_rag/version.rb +1 -1
- 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: 2561f5f1e139dc1756fcf07e662970cfa513f4ccfc021cc97f9664ec793aba33
|
4
|
+
data.tar.gz: 43968aafd230f2f21a450ec512ee55654cd3f2af54bd90fa5fafa28b01db6ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9391dcda0ebd8b721085b899c1ad95e31dcf8bad03b436d63711b65d92904f8b9097e01e6489072d4f28c78ff85f777c969be351c4fa48387e6c66ace17b52eb
|
7
|
+
data.tar.gz: ee6397e137c054c51c57b34e2872a231e88bbf01815a3a6f317546aa2a5786f238cf4245fa4463744fc6702e5c2d269369289da0ad09abdb6525d90038a3c812
|
data/lib/simple_rag/index.rb
CHANGED
@@ -8,7 +8,8 @@ module SimpleRag
|
|
8
8
|
def load(url)
|
9
9
|
response = HTTParty.get(url)
|
10
10
|
text = response.body
|
11
|
-
|
11
|
+
|
12
|
+
File.write(get_absolute_path, text)
|
12
13
|
@text = text
|
13
14
|
text
|
14
15
|
end
|
@@ -29,12 +30,9 @@ module SimpleRag
|
|
29
30
|
index
|
30
31
|
end
|
31
32
|
|
32
|
-
|
33
|
-
def
|
34
|
-
|
35
|
-
# Get the absolute path to the 'data' directory within the gem
|
36
|
-
data_dir = File.expand_path('../../../data', __FILE__)
|
37
|
-
file_path = File.join(data_dir, 'essay.txt')
|
33
|
+
#TODO: Strip out this hack.
|
34
|
+
def get_absolute_path
|
35
|
+
File.expand_path('../../../data/essay.txt', __FILE__)
|
38
36
|
end
|
39
37
|
end
|
40
38
|
end
|
data/lib/simple_rag/version.rb
CHANGED