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.
- checksums.yaml +4 -4
- data/bin/understand +6 -2
- data/lib/understand.rb +18 -2
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2cf96bc7bb590fd85ed5e7c0ee0f0732a0678bd841392ad8294c7153014bdaa5
|
|
4
|
+
data.tar.gz: 52678bf6c6646f12a7740643623375d18f04d926a8332ebe9f6a9a7b03342ab0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0cf7721893fca0e554e16bb8d872527e42402b186f75ce4c6c00047677c640eb53b1ac8fd90577d2df55b19f1ffe8b3d7901e08c19796846a30c394b1359f22
|
|
7
|
+
data.tar.gz: 6e0b3949a9dc3a1df9cd97251d3146b8de3952d0420f151e464d793c41f588117bcb3d457a12390fe1618c1609e3dcb81f0dd54cb5f1544ffa54bf4e4191502f
|
data/bin/understand
CHANGED
data/lib/understand.rb
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
require "rllama"
|
|
2
|
+
|
|
1
3
|
class Understand
|
|
2
|
-
|
|
3
|
-
|
|
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.
|
|
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
|