Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.1"
".": "0.3.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 11
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/deeprails-inc%2Fdeeprails-5f0bb342de09a42c51e94feacb97cb4c11c513120637868e4bd0cdaedff14c0c.yml
openapi_spec_hash: 616b686ef84ded4978605efdbb72183e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/deeprails-inc%2Fdeeprails-1b76015cbe2a339cfce6bdbdd0b09dcc23535e2dcd992306697d1e40d4a0f035.yml
openapi_spec_hash: ab1376d561bd2ee20973ba549a1d73f7
config_hash: 63c6f27e0ba2846cf2d04e70777b3b21
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.3.0 (2025-10-10)

Full Changelog: [v0.2.1...v0.3.0](https://github.com/deeprails/deeprails-ruby-sdk/compare/v0.2.1...v0.3.0)

### Features

* **api:** manual updates ([986412f](https://github.com/deeprails/deeprails-ruby-sdk/commit/986412f6888691af0abdec609a5d456bdac2c1e9))

## 0.2.1 (2025-10-09)

Full Changelog: [v0.2.0...v0.2.1](https://github.com/deeprails/deeprails-ruby-sdk/compare/v0.2.0...v0.2.1)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
deeprails (0.2.1)
deeprails (0.3.0)
connection_pool

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "deeprails", "~> 0.2.1"
gem "deeprails", "~> 0.3.0"
```

<!-- x-release-please-end -->
Expand Down
18 changes: 9 additions & 9 deletions lib/deeprails/models/defend_submit_event_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ class DefendSubmitEventParams < Deeprails::Internal::Type::BaseModel
# @return [String]
required :model_used, String

# @!attribute nametag
# An optional, user-defined tag for the event.
#
# @return [String]
required :nametag, String

# @!attribute run_mode
# Run mode for the workflow event. The run mode allows the user to optimize for
# speed, accuracy, and cost by determining which models are used to evaluate the
Expand All @@ -42,7 +36,13 @@ class DefendSubmitEventParams < Deeprails::Internal::Type::BaseModel
# @return [Symbol, Deeprails::Models::DefendSubmitEventParams::RunMode]
required :run_mode, enum: -> { Deeprails::DefendSubmitEventParams::RunMode }

# @!method initialize(model_input:, model_output:, model_used:, nametag:, run_mode:, request_options: {})
# @!attribute nametag
# An optional, user-defined tag for the event.
#
# @return [String, nil]
optional :nametag, String

# @!method initialize(model_input:, model_output:, model_used:, run_mode:, nametag: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {Deeprails::Models::DefendSubmitEventParams} for more details.
#
Expand All @@ -52,10 +52,10 @@ class DefendSubmitEventParams < Deeprails::Internal::Type::BaseModel
#
# @param model_used [String] Model ID used to generate the output, like `gpt-4o` or `o3`.
#
# @param nametag [String] An optional, user-defined tag for the event.
#
# @param run_mode [Symbol, Deeprails::Models::DefendSubmitEventParams::RunMode] Run mode for the workflow event. The run mode allows the user to optimize for s
#
# @param nametag [String] An optional, user-defined tag for the event.
#
# @param request_options [Deeprails::RequestOptions, Hash{Symbol=>Object}]

class ModelInput < Deeprails::Internal::Type::BaseModel
Expand Down
6 changes: 3 additions & 3 deletions lib/deeprails/resources/defend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def retrieve_workflow(workflow_id, params = {})
# Use this endpoint to submit a model input and output pair to a workflow for
# evaluation
#
# @overload submit_event(workflow_id, model_input:, model_output:, model_used:, nametag:, run_mode:, request_options: {})
# @overload submit_event(workflow_id, model_input:, model_output:, model_used:, run_mode:, nametag: nil, request_options: {})
#
# @param workflow_id [String] Workflow ID associated with this event.
#
Expand All @@ -104,10 +104,10 @@ def retrieve_workflow(workflow_id, params = {})
#
# @param model_used [String] Model ID used to generate the output, like `gpt-4o` or `o3`.
#
# @param nametag [String] An optional, user-defined tag for the event.
#
# @param run_mode [Symbol, Deeprails::Models::DefendSubmitEventParams::RunMode] Run mode for the workflow event. The run mode allows the user to optimize for s
#
# @param nametag [String] An optional, user-defined tag for the event.
#
# @param request_options [Deeprails::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [Deeprails::Models::WorkflowEventResponse]
Expand Down
2 changes: 1 addition & 1 deletion lib/deeprails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Deeprails
VERSION = "0.2.1"
VERSION = "0.3.0"
end
19 changes: 11 additions & 8 deletions rbi/deeprails/models/defend_submit_event_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,27 @@ module Deeprails
sig { returns(String) }
attr_accessor :model_used

# An optional, user-defined tag for the event.
sig { returns(String) }
attr_accessor :nametag

# Run mode for the workflow event. The run mode allows the user to optimize for
# speed, accuracy, and cost by determining which models are used to evaluate the
# event. Available run modes include `precision_plus`, `precision`, `smart`, and
# `economy`. Defaults to `smart`.
sig { returns(Deeprails::DefendSubmitEventParams::RunMode::OrSymbol) }
attr_accessor :run_mode

# An optional, user-defined tag for the event.
sig { returns(T.nilable(String)) }
attr_reader :nametag

sig { params(nametag: String).void }
attr_writer :nametag

sig do
params(
model_input: Deeprails::DefendSubmitEventParams::ModelInput::OrHash,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::DefendSubmitEventParams::RunMode::OrSymbol,
nametag: String,
request_options: Deeprails::RequestOptions::OrHash
).returns(T.attached_class)
end
Expand All @@ -65,13 +68,13 @@ module Deeprails
model_output:,
# Model ID used to generate the output, like `gpt-4o` or `o3`.
model_used:,
# An optional, user-defined tag for the event.
nametag:,
# Run mode for the workflow event. The run mode allows the user to optimize for
# speed, accuracy, and cost by determining which models are used to evaluate the
# event. Available run modes include `precision_plus`, `precision`, `smart`, and
# `economy`. Defaults to `smart`.
run_mode:,
# An optional, user-defined tag for the event.
nametag: nil,
request_options: {}
)
end
Expand All @@ -82,8 +85,8 @@ module Deeprails
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::DefendSubmitEventParams::RunMode::OrSymbol,
nametag: String,
request_options: Deeprails::RequestOptions
}
)
Expand Down
6 changes: 3 additions & 3 deletions rbi/deeprails/resources/defend.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ module Deeprails
model_input: Deeprails::DefendSubmitEventParams::ModelInput::OrHash,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::DefendSubmitEventParams::RunMode::OrSymbol,
nametag: String,
request_options: Deeprails::RequestOptions::OrHash
).returns(Deeprails::WorkflowEventResponse)
end
Expand All @@ -109,13 +109,13 @@ module Deeprails
model_output:,
# Model ID used to generate the output, like `gpt-4o` or `o3`.
model_used:,
# An optional, user-defined tag for the event.
nametag:,
# Run mode for the workflow event. The run mode allows the user to optimize for
# speed, accuracy, and cost by determining which models are used to evaluate the
# event. Available run modes include `precision_plus`, `precision`, `smart`, and
# `economy`. Defaults to `smart`.
run_mode:,
# An optional, user-defined tag for the event.
nametag: nil,
request_options: {}
)
end
Expand Down
14 changes: 8 additions & 6 deletions sig/deeprails/models/defend_submit_event_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module Deeprails
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::Models::DefendSubmitEventParams::run_mode
run_mode: Deeprails::Models::DefendSubmitEventParams::run_mode,
nametag: String
}
& Deeprails::Internal::Type::request_parameters

Expand All @@ -20,25 +20,27 @@ module Deeprails

attr_accessor model_used: String

attr_accessor nametag: String

attr_accessor run_mode: Deeprails::Models::DefendSubmitEventParams::run_mode

attr_reader nametag: String?

def nametag=: (String) -> String

def initialize: (
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::Models::DefendSubmitEventParams::run_mode,
?nametag: String,
?request_options: Deeprails::request_opts
) -> void

def to_hash: -> {
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::Models::DefendSubmitEventParams::run_mode,
nametag: String,
request_options: Deeprails::RequestOptions
}

Expand Down
2 changes: 1 addition & 1 deletion sig/deeprails/resources/defend.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module Deeprails
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
model_output: String,
model_used: String,
nametag: String,
run_mode: Deeprails::Models::DefendSubmitEventParams::run_mode,
?nametag: String,
?request_options: Deeprails::request_opts
) -> Deeprails::WorkflowEventResponse

Expand Down
1 change: 0 additions & 1 deletion test/deeprails/resources/defend_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def test_submit_event_required_params
model_input: {user_prompt: "user_prompt"},
model_output: "model_output",
model_used: "model_used",
nametag: "nametag",
run_mode: :precision_plus
)

Expand Down