ruby_llm-registry 0.1.0 → 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 +4 -4
- data/README.md +8 -8
- data/lib/ruby_llm/registry/version.rb +1 -1
- data/sig/ruby_llm/registry.rbs +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: 65621c31f861999b1c43c0fe7284ab1712286d2acea809ef39ce9f0d1e9ef011
|
|
4
|
+
data.tar.gz: 1621f96e394c208c27eadd8106b6eef2b2be24a9f6abb1fbf12c8646471f0295
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fddf7c8478a0f0616f4ecef453bf84da54473015e7a8c5a069ecc64afe8648465ac375083651325950b2d8e19cad060d823362203b7199afee6189c58bcd15a7
|
|
7
|
+
data.tar.gz: d6ad921b31b095d223cdc0a733c8cdbe814f246c358d0e766a9d1bb59d779f48a1c95e6bc48973336f27433d602179ac6e3452ed68b28fda3040c1d5fb0dee1e
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# RubyLLM::Registry
|
|
2
2
|
|
|
3
3
|
[](https://github.com/washu/ruby_llm-registry/actions/workflows/ci.yml)
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ Local-first, versioned prompt storage and rendering for RubyLLM applications.
|
|
|
6
6
|
|
|
7
7
|
## What it does
|
|
8
8
|
|
|
9
|
-
`
|
|
9
|
+
`RubyLLM::Registry` treats prompts as immutable artifacts stored outside your app code. It can:
|
|
10
10
|
|
|
11
11
|
- load the latest or a specific semantic version
|
|
12
12
|
- resolve labels like `production` or `staging`
|
|
@@ -19,7 +19,7 @@ Local-first, versioned prompt storage and rendering for RubyLLM applications.
|
|
|
19
19
|
## Quick start
|
|
20
20
|
|
|
21
21
|
```ruby
|
|
22
|
-
prompt =
|
|
22
|
+
prompt = RubyLLM::Registry.get("email/summarizer", label: :production)
|
|
23
23
|
|
|
24
24
|
rendered = prompt.render(
|
|
25
25
|
user_name: "Ava",
|
|
@@ -27,7 +27,7 @@ rendered = prompt.render(
|
|
|
27
27
|
summary_length: "concise"
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
-
diff =
|
|
30
|
+
diff = RubyLLM::Registry.diff(prompt, prompt.export(format: :markdown))
|
|
31
31
|
puts diff.changed_fields
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -36,12 +36,12 @@ puts diff.changed_fields
|
|
|
36
36
|
The gem stays filesystem-first by default. If you need a different store, opt in explicitly:
|
|
37
37
|
|
|
38
38
|
```ruby
|
|
39
|
-
sqlite =
|
|
39
|
+
sqlite = RubyLLM::Registry.database_backend(:sqlite, path: "tmp/prompts.db")
|
|
40
40
|
|
|
41
41
|
# or, when those integrations are available in your app:
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
42
|
+
# RubyLLM::Registry.database_backend(:active_record)
|
|
43
|
+
# RubyLLM::Registry.database_backend(:mongo, collection: MyCollection)
|
|
44
|
+
# RubyLLM::Registry.backend(:s3, client: s3_client, bucket: "my-bucket")
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
All non-filesystem adapters are loaded lazily, so your app only pulls in the storage stack it actually uses.
|
data/sig/ruby_llm/registry.rbs
CHANGED