simple_rag 0.1.1 → 0.1.2

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: 3724a03c6f8e734b9875d91067f090c7b150fa8bc7a557f4a31a0577154ffae1
4
- data.tar.gz: 1d0fa5bebc26ef9e22d3955454ea23a6954e26a242996e06dd75ea9abd100996
3
+ metadata.gz: 8819bca51827c5ce7e25655046e7ac9890ed1d07e76216be3ad141727863291b
4
+ data.tar.gz: d49fae4dc8987123feeea01fe353740744e33fb96893ca8a073c84d34fb9f5b4
5
5
  SHA512:
6
- metadata.gz: 64fe6f14c5adbd15be9a29cd2f5edcf2d76192e46db738b4eb0bb444c13c5a1dc95dbdf479c88af12fa8add6ba8a1dc230cec9bd39287a4fc3a707599b396b00
7
- data.tar.gz: 6fe8e23fd9c28e873c935da2ee453ba1bf44d7011c3de0fcd0095eec06310f9e4bc11f03777d1c2ff6319311b63eae187063684055446ca85c4f5aa2fcde36c1
6
+ metadata.gz: 5ea333e9d27b0324b80e4cd216e161e79f25e600f261d417052e63ce9da395922fa5d17b6db52c0f362adb2e90ebfcf9b8eb2a3a4e3adb05a17bc34ba9b3c534
7
+ data.tar.gz: a759f83b16340393403fb422839b2cdff6e3990bcc78787224e1010599639b9bac4c19e017fd0aa3502ec55f4d148286ab28ecc6199a01e79c7127447743cbef
@@ -8,7 +8,7 @@ module SimpleRag
8
8
  def load(url)
9
9
  response = HTTParty.get(url)
10
10
  text = response.body
11
- File.write("data/essay.txt", text)
11
+ File.write(corrected_file_path, text)
12
12
  @text = text
13
13
  text
14
14
  end
@@ -28,5 +28,13 @@ module SimpleRag
28
28
  index.add(text_embeddings)
29
29
  index
30
30
  end
31
+
32
+ private
33
+ def corrected_file_path
34
+ #Todo: Fix this terrible hack.
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')
38
+ end
31
39
  end
32
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleRag
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_rag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Landon Gray