boxcars 1.0.0 → 1.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/CHANGELOG.md +11 -0
- data/Gemfile +6 -4
- data/Gemfile.lock +20 -19
- data/lib/boxcars/engine/anthropic.rb +4 -1
- data/lib/boxcars/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: 31ea2806f05be51124879c3968f9bc44bd61ca8cefc5af3bf75726dcf38f65e7
|
|
4
|
+
data.tar.gz: e7c6a37aeeeac31139e5a9179784f0e9810d9efa764951eeed25e68149d490e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c868c51d4072e59ce42f481cc6f079ae2936c4ca533ffefa14002faf4b373d6deabec11ce31374762639e6fc42d6407bce31e1cfd60c8749fa6f5da9a51dfd67
|
|
7
|
+
data.tar.gz: 46227389507d10b05c152ef0d4e8a92e8bd75d33cb9ec056b03bafe759ccce368882bb9b04f7dde2d825198ea9b197de7d9bb86be43501807de9c71711286cc6
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.0.1] - 2026-10-06
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Anthropic engine options now normalize string keys before merging defaults and request overrides, so sampling compatibility uses the requested model. Opus 4.7 and Opus 5 models (including Opus 5.5) omit `temperature`, `top_p`, and `top_k` through both normal and JSON engine paths; models that support sampling retain their supplied values.
|
|
10
|
+
|
|
11
|
+
### Maintenance
|
|
12
|
+
|
|
13
|
+
- Updated OpenAI to 0.95.0, PostHog to 3.26.0, Active Record to 8.1.4, Faraday to 2.14.4, and RuboCop to 1.91.0 in the development bundle.
|
|
14
|
+
- Kept the development bundle on JSON 2.x because the current PostgreSQL and Google Search clients use parsing options removed in JSON 3.
|
|
15
|
+
|
|
5
16
|
## [1.0.0] - 2026-08-28
|
|
6
17
|
|
|
7
18
|
### Added
|
data/Gemfile
CHANGED
|
@@ -12,21 +12,23 @@ gem "activerecord", "~> 8.1"
|
|
|
12
12
|
gem "activesupport", "~> 8.1"
|
|
13
13
|
gem "pg", "~> 1.5"
|
|
14
14
|
gem "pgvector", "~> 0.3.2"
|
|
15
|
+
# pg 1.6 and google_search_results 2.2 still use JSON parsing options removed in JSON 3.
|
|
16
|
+
gem "json", "~> 2.21"
|
|
15
17
|
|
|
16
18
|
group :development, :test do
|
|
17
19
|
# Optional runtime provider/tooling gems kept here for local development + CI.
|
|
18
20
|
gem "openai", ">= 0.30"
|
|
19
|
-
gem "faraday", "~> 2.
|
|
21
|
+
gem "faraday", "~> 2.14"
|
|
20
22
|
gem "google_search_results", "~> 2.2"
|
|
21
23
|
gem "hnswlib", "~> 0.9.0"
|
|
22
24
|
gem "nokogiri", "~> 1.18"
|
|
23
|
-
gem "sequel", "~> 5.
|
|
25
|
+
gem "sequel", "~> 5.108"
|
|
24
26
|
gem "ruby-anthropic", "~> 0.4"
|
|
25
27
|
gem "debug", "~> 1.9"
|
|
26
28
|
gem "rspec", "~> 3.13"
|
|
27
|
-
gem "rubocop", "~> 1.
|
|
29
|
+
gem "rubocop", "~> 1.91"
|
|
28
30
|
gem "vcr", "~> 6.4.0"
|
|
29
|
-
gem "webmock", "~> 3.26.
|
|
31
|
+
gem "webmock", "~> 3.26.4"
|
|
30
32
|
gem "rubocop-rake", "~> 0.7.1"
|
|
31
33
|
gem "rubocop-rspec", "~> 3.2"
|
|
32
34
|
gem "posthog-ruby", require: false
|
data/Gemfile.lock
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
boxcars (1.0.
|
|
4
|
+
boxcars (1.0.1)
|
|
5
5
|
logger
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activemodel (8.1.
|
|
11
|
-
activesupport (= 8.1.
|
|
12
|
-
activerecord (8.1.
|
|
13
|
-
activemodel (= 8.1.
|
|
14
|
-
activesupport (= 8.1.
|
|
10
|
+
activemodel (8.1.4)
|
|
11
|
+
activesupport (= 8.1.4)
|
|
12
|
+
activerecord (8.1.4)
|
|
13
|
+
activemodel (= 8.1.4)
|
|
14
|
+
activesupport (= 8.1.4)
|
|
15
15
|
timeout (>= 0.4.0)
|
|
16
|
-
activesupport (8.1.
|
|
16
|
+
activesupport (8.1.4)
|
|
17
17
|
base64
|
|
18
18
|
bigdecimal
|
|
19
19
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -30,7 +30,7 @@ GEM
|
|
|
30
30
|
public_suffix (>= 2.0.2, < 8.0)
|
|
31
31
|
ast (2.4.3)
|
|
32
32
|
base64 (0.3.0)
|
|
33
|
-
bigdecimal (4.1.
|
|
33
|
+
bigdecimal (4.1.3)
|
|
34
34
|
concurrent-ruby (1.3.8)
|
|
35
35
|
connection_pool (3.0.2)
|
|
36
36
|
crack (1.0.1)
|
|
@@ -44,7 +44,7 @@ GEM
|
|
|
44
44
|
drb (2.2.3)
|
|
45
45
|
erb (6.0.7)
|
|
46
46
|
event_stream_parser (1.0.0)
|
|
47
|
-
faraday (2.14.
|
|
47
|
+
faraday (2.14.4)
|
|
48
48
|
faraday-net_http (>= 2.0, < 3.5)
|
|
49
49
|
json
|
|
50
50
|
logger
|
|
@@ -89,10 +89,10 @@ GEM
|
|
|
89
89
|
racc (~> 1.4)
|
|
90
90
|
nokogiri (1.19.4-x86_64-linux-musl)
|
|
91
91
|
racc (~> 1.4)
|
|
92
|
-
openai (0.
|
|
92
|
+
openai (0.95.0)
|
|
93
93
|
connection_pool (>= 2.2.3)
|
|
94
94
|
logger
|
|
95
|
-
parallel (2.
|
|
95
|
+
parallel (2.2.0)
|
|
96
96
|
parser (3.3.12.0)
|
|
97
97
|
ast (~> 2.4.1)
|
|
98
98
|
racc
|
|
@@ -104,7 +104,7 @@ GEM
|
|
|
104
104
|
pg (1.6.3-x86_64-linux)
|
|
105
105
|
pg (1.6.3-x86_64-linux-musl)
|
|
106
106
|
pgvector (0.3.3)
|
|
107
|
-
posthog-ruby (3.
|
|
107
|
+
posthog-ruby (3.26.0)
|
|
108
108
|
concurrent-ruby (~> 1)
|
|
109
109
|
pp (0.6.4)
|
|
110
110
|
prettyprint
|
|
@@ -140,7 +140,7 @@ GEM
|
|
|
140
140
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
141
141
|
rspec-support (~> 3.13.0)
|
|
142
142
|
rspec-support (3.13.7)
|
|
143
|
-
rubocop (1.
|
|
143
|
+
rubocop (1.91.0)
|
|
144
144
|
json (>= 2.3)
|
|
145
145
|
language_server-protocol (~> 3.17.0.2)
|
|
146
146
|
lint_roller (~> 1.1.0)
|
|
@@ -167,7 +167,7 @@ GEM
|
|
|
167
167
|
faraday-multipart (>= 1)
|
|
168
168
|
ruby-progressbar (1.13.0)
|
|
169
169
|
securerandom (0.4.1)
|
|
170
|
-
sequel (5.
|
|
170
|
+
sequel (5.108.0)
|
|
171
171
|
bigdecimal
|
|
172
172
|
sqlite3 (2.9.6-aarch64-linux-gnu)
|
|
173
173
|
sqlite3 (2.9.6-aarch64-linux-musl)
|
|
@@ -186,7 +186,7 @@ GEM
|
|
|
186
186
|
unicode-emoji (4.2.0)
|
|
187
187
|
uri (1.1.1)
|
|
188
188
|
vcr (6.4.0)
|
|
189
|
-
webmock (3.26.
|
|
189
|
+
webmock (3.26.4)
|
|
190
190
|
addressable (>= 2.8.0)
|
|
191
191
|
crack (>= 0.3.2)
|
|
192
192
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -207,9 +207,10 @@ DEPENDENCIES
|
|
|
207
207
|
boxcars!
|
|
208
208
|
debug (~> 1.9)
|
|
209
209
|
dotenv (~> 3.1)
|
|
210
|
-
faraday (~> 2.
|
|
210
|
+
faraday (~> 2.14)
|
|
211
211
|
google_search_results (~> 2.2)
|
|
212
212
|
hnswlib (~> 0.9.0)
|
|
213
|
+
json (~> 2.21)
|
|
213
214
|
nokogiri (~> 1.18)
|
|
214
215
|
openai (>= 0.30)
|
|
215
216
|
pg (~> 1.5)
|
|
@@ -217,14 +218,14 @@ DEPENDENCIES
|
|
|
217
218
|
posthog-ruby
|
|
218
219
|
rake (~> 13.2)
|
|
219
220
|
rspec (~> 3.13)
|
|
220
|
-
rubocop (~> 1.
|
|
221
|
+
rubocop (~> 1.91)
|
|
221
222
|
rubocop-rake (~> 0.7.1)
|
|
222
223
|
rubocop-rspec (~> 3.2)
|
|
223
224
|
ruby-anthropic (~> 0.4)
|
|
224
|
-
sequel (~> 5.
|
|
225
|
+
sequel (~> 5.108)
|
|
225
226
|
sqlite3 (~> 2.0)
|
|
226
227
|
vcr (~> 6.4.0)
|
|
227
|
-
webmock (~> 3.26.
|
|
228
|
+
webmock (~> 3.26.4)
|
|
228
229
|
|
|
229
230
|
BUNDLED WITH
|
|
230
231
|
4.0.16
|
|
@@ -15,6 +15,8 @@ module Boxcars
|
|
|
15
15
|
max_tokens: 4096,
|
|
16
16
|
temperature: 0.1
|
|
17
17
|
}.freeze
|
|
18
|
+
# Includes versioned IDs such as claude-opus-5-5. Omit sampling parameters as
|
|
19
|
+
# recommended by https://platform.claude.com/docs/en/models/opus-5-5/migration-guide.
|
|
18
20
|
MODELS_WITHOUT_SAMPLING_PARAMS = %w[
|
|
19
21
|
claude-opus-4-7
|
|
20
22
|
claude-sonnet-5
|
|
@@ -31,6 +33,7 @@ module Boxcars
|
|
|
31
33
|
|
|
32
34
|
# Initializes an Anthropic engine instance.
|
|
33
35
|
def initialize(name: DEFAULT_NAME, description: DEFAULT_DESCRIPTION, **kwargs)
|
|
36
|
+
kwargs = kwargs.transform_keys(&:to_sym)
|
|
34
37
|
raise ArgumentError, "unknown keyword: :prompts" if kwargs.key?(:prompts)
|
|
35
38
|
|
|
36
39
|
user_id = kwargs.delete(:user_id)
|
|
@@ -47,7 +50,7 @@ module Boxcars
|
|
|
47
50
|
def client(prompt:, inputs: {}, **kwargs)
|
|
48
51
|
start_time = Time.now
|
|
49
52
|
response_data = { response_obj: nil, parsed_json: nil, success: false, error: nil, status_code: nil }
|
|
50
|
-
current_params = llm_params.merge(kwargs)
|
|
53
|
+
current_params = llm_params.merge(kwargs.transform_keys(&:to_sym))
|
|
51
54
|
current_prompt_object = prompt
|
|
52
55
|
api_request_params = nil
|
|
53
56
|
|
data/lib/boxcars/version.rb
CHANGED