understand 0.0.0 → 0.0.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/understand +6 -2
  3. data/lib/understand.rb +18 -2
  4. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86a05e2ff179cb908a9b5400b548a31c7fe64f4dce41ee60614107a2bcf15704
4
- data.tar.gz: e527daf41b0d24bbdb7763ae96b5f9dc50c891c278b42a61527a69e079b39dbf
3
+ metadata.gz: 2cf96bc7bb590fd85ed5e7c0ee0f0732a0678bd841392ad8294c7153014bdaa5
4
+ data.tar.gz: 52678bf6c6646f12a7740643623375d18f04d926a8332ebe9f6a9a7b03342ab0
5
5
  SHA512:
6
- metadata.gz: 9be5dd6701740e086942ce7da003c31b1285759782f8eb973198c187620e2d4a7534f5b6844556595cbcf71e664c3c388b2e0a56018da42360362b41f8bf8e80
7
- data.tar.gz: ac8b2a995a24ecbddab063c9c4b7af2a5568d6919bb575e039c50848bb12c7a46f86ae68d169e608577fec271876f89e725739dbbf008c3fd00906e95a0a9038
6
+ metadata.gz: d0cf7721893fca0e554e16bb8d872527e42402b186f75ce4c6c00047677c640eb53b1ac8fd90577d2df55b19f1ffe8b3d7901e08c19796846a30c394b1359f22
7
+ data.tar.gz: 6e0b3949a9dc3a1df9cd97251d3146b8de3952d0420f151e464d793c41f588117bcb3d457a12390fe1618c1609e3dcb81f0dd54cb5f1544ffa54bf4e4191502f
data/bin/understand CHANGED
@@ -1,3 +1,7 @@
1
1
  require "understand"
2
-
3
- Understand.hello
2
+ user_prompt = if ARGV[0]
3
+ user_prompt
4
+ else
5
+ "Help me understand my application more."
6
+ end
7
+ Understand.new(user_prompt).call
data/lib/understand.rb CHANGED
@@ -1,5 +1,21 @@
1
+ require "rllama"
2
+
1
3
  class Understand
2
- def self.hello
3
- puts 'Hello world'
4
+ attr_reader :user_prompt
5
+ def initialize(user_prompt)
6
+ @user_prompt = user_prompt
7
+ end
8
+
9
+ def call
10
+ model = Rllama.load_model('lmstudio-community/gemma-3-1B-it-QAT-GGUF/gemma-3-1B-it-QAT-Q4_0.gguf')
11
+ files = Dir.glob("**/*").select { |f| File.file?(f) }
12
+ files.each do |file|
13
+ prompt_for_ai = user_prompt + "--- File path: #{file} Content: #{File.read(file)}"
14
+ puts "💡 🔎 Understanding #{file}"
15
+ result = model.generate(prompt_for_ai) do |token|
16
+ print token
17
+ end
18
+ end
19
+ model.close
4
20
  end
5
21
  end
metadata CHANGED
@@ -1,14 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: understand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Indigo Tech
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
- dependencies: []
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rllama
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: 1.0.3
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: 1.0.3
12
26
  description: A gem to help you understand your codebases using the power of LLM's
13
27
  ( not a vibe coding tool )
14
28
  email: indigo@tech.tut