active_prompt_rails 0.1.19 → 0.1.20
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/README.md +2 -2
- data/lib/active_prompt/base.rb +1 -1
- data/lib/active_prompt/railtie.rb +1 -0
- data/lib/active_prompt/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: 0d884aa97e92b98c307785818064cc0df6e65a4f290f000c9410f2203779dd75
|
|
4
|
+
data.tar.gz: d858cadc9db796cc036f148259c17eebdcb803b9288cea7506b3554de601279e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c38b600e5fcd89cabd640654e799d28ff9f529b607109843c7d40290c9a8c6e4b4ab908498b3e318cff62592493df4a38f38b0b7c5012b8e093dffbbba041c8
|
|
7
|
+
data.tar.gz: c1b6aa197e94d8acfb4cde43e4631855cbc3f458f7e9db35df4bf90d7d7bc12e2705d03c3a043e3ded0bf8f746d678777e147dfff514bb4bee1a0e329c8fe7a3
|
data/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# ActivePrompt
|
|
2
2
|
|
|
3
|
-
ActivePrompt is a gem that helps you structure and manage LLM prompts in your rails apps.
|
|
3
|
+
ActivePrompt is a gem that helps you structure and manage LLM prompts in your rails apps. View the gem on [RubyGems](https://rubygems.org/gems/active_prompt_rails).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
Add the following line to your Gemfile:
|
|
8
8
|
|
|
9
9
|
```Gemfile
|
|
10
|
-
gem "active_prompt_rails", "~> 0.1.
|
|
10
|
+
gem "active_prompt_rails", "~> 0.1.20", require: "active_prompt"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
and run `bundle install`
|
data/lib/active_prompt/base.rb
CHANGED
|
@@ -43,7 +43,7 @@ module ActivePrompt
|
|
|
43
43
|
private
|
|
44
44
|
|
|
45
45
|
def render_template(template_name)
|
|
46
|
-
template_path = File.join("app", "prompts", "templates",
|
|
46
|
+
template_path = File.join("app", "prompts", "templates", self.class.name.underscore.to_s, template_name)
|
|
47
47
|
template = File.read(template_path)
|
|
48
48
|
context = # Dynamic method call to get the variable value
|
|
49
49
|
self.class.variables.map do |var|
|