deeprails 0.16.0 → 0.17.0
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 +8 -0
- data/README.md +16 -16
- data/SECURITY.md +2 -2
- data/lib/deeprails/client.rb +2 -2
- data/lib/deeprails/version.rb +1 -1
- data/rbi/deeprails/client.rbi +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e16326e0d6a780a8c1dca743b2e759d371831f0f81110249ee2e00e4c22c8a23
|
|
4
|
+
data.tar.gz: 4a1f038287407dc67082a839f82687764126a386027277a79a0da15cab1385f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2f5bf62e63fa4e3218810f24df9bda5cf44a305f8e362ba76584c32d5b0f41568e1d685ddbf4156c99b87b7b649b1e70b74967155a35c52b91f37577ef58f74
|
|
7
|
+
data.tar.gz: 5682e8d766c3573d8ff11606ed4daf4cce641736ba8b87ee0f46e4e41ab6000b03db7fee46558b964f7b66ed95d37517b620f5c625f80aaaf63ceeeea93f3e2f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.0 (2025-11-19)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.16.0...v0.17.0](https://github.com/deeprails/deeprails-ruby-sdk/compare/v0.16.0...v0.17.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update package name casing ([94dcce7](https://github.com/deeprails/deeprails-ruby-sdk/commit/94dcce764af00fa51541e4fb2217eb2e743efe61))
|
|
10
|
+
|
|
3
11
|
## 0.16.0 (2025-11-18)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.15.0...v0.16.0](https://github.com/deeprails/deeprails-ruby-sdk/compare/v0.15.0...v0.16.0)
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Deep Rails Ruby API library
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The Deep Rails Ruby library provides convenient access to the Deep Rails REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/deeprails/deeprails-ruby-sdk#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "deeprails", "~> 0.
|
|
18
|
+
gem "deeprails", "~> 0.17.0"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -26,11 +26,11 @@ gem "deeprails", "~> 0.16.0"
|
|
|
26
26
|
require "bundler/setup"
|
|
27
27
|
require "deeprails"
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
deep_rails = Deeprails::Client.new(
|
|
30
30
|
api_key: ENV["DEEPRAILS_API_KEY"] # This is the default and can be omitted
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
defend_create_response =
|
|
33
|
+
defend_create_response = deep_rails.defend.create_workflow(
|
|
34
34
|
improvement_action: "fixit",
|
|
35
35
|
name: "Push Alert Workflow",
|
|
36
36
|
threshold_type: "custom",
|
|
@@ -47,7 +47,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
|
|
|
47
47
|
|
|
48
48
|
```ruby
|
|
49
49
|
begin
|
|
50
|
-
defend =
|
|
50
|
+
defend = deep_rails.defend.create_workflow(
|
|
51
51
|
improvement_action: "fixit",
|
|
52
52
|
name: "Push Alert Workflow",
|
|
53
53
|
threshold_type: "custom",
|
|
@@ -91,12 +91,12 @@ You can use the `max_retries` option to configure or disable this:
|
|
|
91
91
|
|
|
92
92
|
```ruby
|
|
93
93
|
# Configure the default for all requests:
|
|
94
|
-
|
|
94
|
+
deep_rails = Deeprails::Client.new(
|
|
95
95
|
max_retries: 0 # default is 2
|
|
96
96
|
)
|
|
97
97
|
|
|
98
98
|
# Or, configure per-request:
|
|
99
|
-
|
|
99
|
+
deep_rails.defend.create_workflow(
|
|
100
100
|
improvement_action: "fixit",
|
|
101
101
|
name: "Push Alert Workflow",
|
|
102
102
|
threshold_type: "custom",
|
|
@@ -112,12 +112,12 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
|
|
|
112
112
|
|
|
113
113
|
```ruby
|
|
114
114
|
# Configure the default for all requests:
|
|
115
|
-
|
|
115
|
+
deep_rails = Deeprails::Client.new(
|
|
116
116
|
timeout: nil # default is 60
|
|
117
117
|
)
|
|
118
118
|
|
|
119
119
|
# Or, configure per-request:
|
|
120
|
-
|
|
120
|
+
deep_rails.defend.create_workflow(
|
|
121
121
|
improvement_action: "fixit",
|
|
122
122
|
name: "Push Alert Workflow",
|
|
123
123
|
threshold_type: "custom",
|
|
@@ -155,7 +155,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
|
|
|
155
155
|
|
|
156
156
|
```ruby
|
|
157
157
|
defend_create_response =
|
|
158
|
-
|
|
158
|
+
deep_rails.defend.create_workflow(
|
|
159
159
|
improvement_action: "fixit",
|
|
160
160
|
name: "Push Alert Workflow",
|
|
161
161
|
threshold_type: "custom",
|
|
@@ -206,7 +206,7 @@ This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitio
|
|
|
206
206
|
You can provide typesafe request parameters like so:
|
|
207
207
|
|
|
208
208
|
```ruby
|
|
209
|
-
|
|
209
|
+
deep_rails.defend.create_workflow(
|
|
210
210
|
improvement_action: "fixit",
|
|
211
211
|
name: "Push Alert Workflow",
|
|
212
212
|
threshold_type: "custom",
|
|
@@ -219,7 +219,7 @@ Or, equivalently:
|
|
|
219
219
|
|
|
220
220
|
```ruby
|
|
221
221
|
# Hashes work, but are not typesafe:
|
|
222
|
-
|
|
222
|
+
deep_rails.defend.create_workflow(
|
|
223
223
|
improvement_action: "fixit",
|
|
224
224
|
name: "Push Alert Workflow",
|
|
225
225
|
threshold_type: "custom",
|
|
@@ -235,7 +235,7 @@ params = Deeprails::DefendCreateWorkflowParams.new(
|
|
|
235
235
|
custom_hallucination_threshold_values: {completeness: 0.7, instruction_adherence: 0.75},
|
|
236
236
|
web_search: true
|
|
237
237
|
)
|
|
238
|
-
|
|
238
|
+
deep_rails.defend.create_workflow(**params)
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
### Enums
|
|
@@ -254,13 +254,13 @@ Enum parameters have a "relaxed" type, so you can either pass in enum constants
|
|
|
254
254
|
|
|
255
255
|
```ruby
|
|
256
256
|
# Using the enum constants preserves the tagged type information:
|
|
257
|
-
|
|
257
|
+
deep_rails.defend.create_workflow(
|
|
258
258
|
improvement_action: Deeprails::DefendCreateWorkflowParams::ImprovementAction::REGEN,
|
|
259
259
|
# …
|
|
260
260
|
)
|
|
261
261
|
|
|
262
262
|
# Literal values are also permissible:
|
|
263
|
-
|
|
263
|
+
deep_rails.defend.create_workflow(
|
|
264
264
|
improvement_action: :regen,
|
|
265
265
|
# …
|
|
266
266
|
)
|
data/SECURITY.md
CHANGED
|
@@ -16,9 +16,9 @@ before making any information public.
|
|
|
16
16
|
## Reporting Non-SDK Related Security Issues
|
|
17
17
|
|
|
18
18
|
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
|
19
|
-
or products provided by
|
|
19
|
+
or products provided by Deep Rails, please follow the respective company's security reporting guidelines.
|
|
20
20
|
|
|
21
|
-
###
|
|
21
|
+
### Deep Rails Terms and Policies
|
|
22
22
|
|
|
23
23
|
Please contact support@deeprails.ai for any questions or concerns regarding the security of our services.
|
|
24
24
|
|
data/lib/deeprails/client.rb
CHANGED
|
@@ -41,7 +41,7 @@ module Deeprails
|
|
|
41
41
|
# @param api_key [String, nil] Defaults to `ENV["DEEPRAILS_API_KEY"]`
|
|
42
42
|
#
|
|
43
43
|
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
|
44
|
-
# `"https://api.example.com/v2/"`. Defaults to `ENV["
|
|
44
|
+
# `"https://api.example.com/v2/"`. Defaults to `ENV["DEEP_RAILS_BASE_URL"]`
|
|
45
45
|
#
|
|
46
46
|
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
|
|
47
47
|
#
|
|
@@ -52,7 +52,7 @@ module Deeprails
|
|
|
52
52
|
# @param max_retry_delay [Float]
|
|
53
53
|
def initialize(
|
|
54
54
|
api_key: ENV["DEEPRAILS_API_KEY"],
|
|
55
|
-
base_url: ENV["
|
|
55
|
+
base_url: ENV["DEEP_RAILS_BASE_URL"],
|
|
56
56
|
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
|
57
57
|
timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS,
|
|
58
58
|
initial_retry_delay: self.class::DEFAULT_INITIAL_RETRY_DELAY,
|
data/lib/deeprails/version.rb
CHANGED
data/rbi/deeprails/client.rbi
CHANGED
|
@@ -42,8 +42,8 @@ module Deeprails
|
|
|
42
42
|
# Defaults to `ENV["DEEPRAILS_API_KEY"]`
|
|
43
43
|
api_key: ENV["DEEPRAILS_API_KEY"],
|
|
44
44
|
# Override the default base URL for the API, e.g.,
|
|
45
|
-
# `"https://api.example.com/v2/"`. Defaults to `ENV["
|
|
46
|
-
base_url: ENV["
|
|
45
|
+
# `"https://api.example.com/v2/"`. Defaults to `ENV["DEEP_RAILS_BASE_URL"]`
|
|
46
|
+
base_url: ENV["DEEP_RAILS_BASE_URL"],
|
|
47
47
|
# Max number of retries to attempt after a failed retryable request.
|
|
48
48
|
max_retries: Deeprails::Client::DEFAULT_MAX_RETRIES,
|
|
49
49
|
timeout: Deeprails::Client::DEFAULT_TIMEOUT_IN_SECONDS,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deeprails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Deep Rails
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -199,5 +199,5 @@ requirements: []
|
|
|
199
199
|
rubygems_version: 3.4.1
|
|
200
200
|
signing_key:
|
|
201
201
|
specification_version: 4
|
|
202
|
-
summary: Ruby library to access the
|
|
202
|
+
summary: Ruby library to access the Deep Rails API
|
|
203
203
|
test_files: []
|