llm.rb 4.20.0 → 4.20.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/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/llm/active_record/acts_as_agent.rb +2 -2
- data/lib/llm/active_record/acts_as_llm.rb +2 -2
- data/lib/llm/sequel/plugin.rb +3 -3
- data/lib/llm/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: 58f2ff0f8147443face2f3d7c48b249b8aec30de4345fa286f87c622853cb516
|
|
4
|
+
data.tar.gz: 9dba9a0609fff95e141ee5a819ff454a9dbd5ecb9c987a1a3e3b73822431d6d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 172de04003136f5b599f5b2c274d9354ca576512bc35e9af85c5672f32bd3ad5f85a8a0b7e60e29c60b8fa7e6bd8d39ed5d23692c60a4b6de0f2c941d542fd41
|
|
7
|
+
data.tar.gz: 9a3ef1da238e38ab51af3a20f235201bca736a41753c9848a589467676a979829dca6c7e5708ee12be344e9e0686ba4652504514b72769ff5d511c5d752dd9f2
|
data/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
Changes since `v4.20.1`.
|
|
6
|
+
|
|
7
|
+
## v4.20.1
|
|
8
|
+
|
|
5
9
|
Changes since `v4.20.0`.
|
|
6
10
|
|
|
11
|
+
This patch release fixes ORM option resolution in the Sequel and
|
|
12
|
+
ActiveRecord wrappers. Symbol-based `provider:` and `context:` hooks now
|
|
13
|
+
resolve correctly, and internal default option constants are referenced
|
|
14
|
+
explicitly instead of relying on nested constant lookup.
|
|
15
|
+
|
|
16
|
+
### Fix
|
|
17
|
+
|
|
18
|
+
* **Fix symbol-based ORM option hooks for provider and context hashes** <br>
|
|
19
|
+
Make `provider:` and `context:` resolve symbol hooks through the model in
|
|
20
|
+
the Sequel plugin and ActiveRecord wrappers instead of falling back to an
|
|
21
|
+
empty hash.
|
|
22
|
+
|
|
23
|
+
* **Fix ORM wrapper constant lookup for option defaults** <br>
|
|
24
|
+
Qualify internal `EMPTY_HASH` / `DEFAULTS` references in the Sequel plugin
|
|
25
|
+
and ActiveRecord wrappers so option resolution does not depend on nested
|
|
26
|
+
constant lookup quirks.
|
|
27
|
+
|
|
7
28
|
## v4.20.0
|
|
8
29
|
|
|
9
30
|
Changes since `v4.19.0`.
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p align="center">
|
|
5
5
|
<a href="https://0x1eef.github.io/x/llm.rb?rebuild=1"><img src="https://img.shields.io/badge/docs-0x1eef.github.io-blue.svg" alt="RubyDoc"></a>
|
|
6
6
|
<a href="https://opensource.org/license/0bsd"><img src="https://img.shields.io/badge/License-0BSD-orange.svg?" alt="License"></a>
|
|
7
|
-
<a href="https://github.com/llmrb/llm.rb/tags"><img src="https://img.shields.io/badge/version-4.20.
|
|
7
|
+
<a href="https://github.com/llmrb/llm.rb/tags"><img src="https://img.shields.io/badge/version-4.20.1-green.svg?" alt="Version"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
## About
|
|
@@ -150,8 +150,8 @@ module LLM::ActiveRecord
|
|
|
150
150
|
# @return [Hash]
|
|
151
151
|
def resolve_options(option)
|
|
152
152
|
case option
|
|
153
|
-
when Proc, Hash then resolve_option(option)
|
|
154
|
-
else EMPTY_HASH.dup
|
|
153
|
+
when Proc, Symbol, Hash then resolve_option(option)
|
|
154
|
+
else ActsAsAgent::EMPTY_HASH.dup
|
|
155
155
|
end
|
|
156
156
|
end
|
|
157
157
|
|
|
@@ -270,8 +270,8 @@ module LLM::ActiveRecord
|
|
|
270
270
|
# @return [Hash]
|
|
271
271
|
def resolve_options(option)
|
|
272
272
|
case option
|
|
273
|
-
when Proc, Hash then resolve_option(option)
|
|
274
|
-
else EMPTY_HASH.dup
|
|
273
|
+
when Proc, Symbol, Hash then resolve_option(option)
|
|
274
|
+
else ActsAsLLM::EMPTY_HASH.dup
|
|
275
275
|
end
|
|
276
276
|
end
|
|
277
277
|
|
data/lib/llm/sequel/plugin.rb
CHANGED
|
@@ -79,7 +79,7 @@ module LLM::Sequel
|
|
|
79
79
|
##
|
|
80
80
|
# @return [Hash]
|
|
81
81
|
def llm_plugin_options
|
|
82
|
-
@llm_plugin_options || DEFAULTS
|
|
82
|
+
@llm_plugin_options || Plugin::DEFAULTS
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -287,8 +287,8 @@ module LLM::Sequel
|
|
|
287
287
|
# @return [Hash]
|
|
288
288
|
def resolve_options(option)
|
|
289
289
|
case option
|
|
290
|
-
when Proc, Hash then resolve_option(option)
|
|
291
|
-
else EMPTY_HASH.dup
|
|
290
|
+
when Proc, Symbol, Hash then resolve_option(option)
|
|
291
|
+
else Plugin::EMPTY_HASH.dup
|
|
292
292
|
end
|
|
293
293
|
end
|
|
294
294
|
|
data/lib/llm/version.rb
CHANGED