deeprails 0.5.0 → 0.7.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.
@@ -91,8 +91,8 @@ module Deeprails
91
91
  # `ground_truth_adherence`, and/or `comprehensive_safety`.
92
92
  guardrail_metrics:,
93
93
  # A dictionary of inputs sent to the LLM to generate output. The dictionary must
94
- # contain at least one of `user_prompt` or `system_prompt`. For
95
- # ground_truth_aherence guadrail metric, `ground_truth` should be provided.
94
+ # contain at least a `user_prompt` or `system_prompt` field. For
95
+ # ground_truth_adherence guardrail metric, `ground_truth` should be provided.
96
96
  model_input:,
97
97
  # Output generated by the LLM to be evaluated.
98
98
  model_output:,
@@ -2,13 +2,13 @@ module Deeprails
2
2
  module Models
3
3
  type defend_create_workflow_params =
4
4
  {
5
- improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action?,
6
- metrics: ::Hash[Symbol, Float],
5
+ improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action,
7
6
  name: String,
8
7
  type: Deeprails::Models::DefendCreateWorkflowParams::type_,
9
- automatic_tolerance: Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance,
8
+ automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level],
9
+ custom_hallucination_threshold_values: ::Hash[Symbol, Float],
10
10
  description: String,
11
- max_retries: Integer
11
+ max_improvement_attempt: Integer
12
12
  }
13
13
  & Deeprails::Internal::Type::request_parameters
14
14
 
@@ -16,57 +16,62 @@ module Deeprails
16
16
  extend Deeprails::Internal::Type::RequestParameters::Converter
17
17
  include Deeprails::Internal::Type::RequestParameters
18
18
 
19
- attr_accessor improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action?
20
-
21
- attr_accessor metrics: ::Hash[Symbol, Float]
19
+ attr_accessor improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action
22
20
 
23
21
  attr_accessor name: String
24
22
 
25
23
  attr_accessor type: Deeprails::Models::DefendCreateWorkflowParams::type_
26
24
 
27
- attr_reader automatic_tolerance: Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance?
25
+ attr_reader automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level]?
26
+
27
+ def automatic_hallucination_tolerance_levels=: (
28
+ ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level]
29
+ ) -> ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level]
30
+
31
+ attr_reader custom_hallucination_threshold_values: ::Hash[Symbol, Float]?
28
32
 
29
- def automatic_tolerance=: (
30
- Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance
31
- ) -> Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance
33
+ def custom_hallucination_threshold_values=: (
34
+ ::Hash[Symbol, Float]
35
+ ) -> ::Hash[Symbol, Float]
32
36
 
33
37
  attr_reader description: String?
34
38
 
35
39
  def description=: (String) -> String
36
40
 
37
- attr_reader max_retries: Integer?
41
+ attr_reader max_improvement_attempt: Integer?
38
42
 
39
- def max_retries=: (Integer) -> Integer
43
+ def max_improvement_attempt=: (Integer) -> Integer
40
44
 
41
45
  def initialize: (
42
- improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action?,
43
- metrics: ::Hash[Symbol, Float],
46
+ improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action,
44
47
  name: String,
45
48
  type: Deeprails::Models::DefendCreateWorkflowParams::type_,
46
- ?automatic_tolerance: Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance,
49
+ ?automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level],
50
+ ?custom_hallucination_threshold_values: ::Hash[Symbol, Float],
47
51
  ?description: String,
48
- ?max_retries: Integer,
52
+ ?max_improvement_attempt: Integer,
49
53
  ?request_options: Deeprails::request_opts
50
54
  ) -> void
51
55
 
52
56
  def to_hash: -> {
53
- improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action?,
54
- metrics: ::Hash[Symbol, Float],
57
+ improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action,
55
58
  name: String,
56
59
  type: Deeprails::Models::DefendCreateWorkflowParams::type_,
57
- automatic_tolerance: Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance,
60
+ automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level],
61
+ custom_hallucination_threshold_values: ::Hash[Symbol, Float],
58
62
  description: String,
59
- max_retries: Integer,
63
+ max_improvement_attempt: Integer,
60
64
  request_options: Deeprails::RequestOptions
61
65
  }
62
66
 
63
- type improvement_action = :regenerate | :fixit
67
+ type improvement_action = :regen | :fixit | :do_nothing
64
68
 
65
69
  module ImprovementAction
66
70
  extend Deeprails::Internal::Type::Enum
67
71
 
68
- REGENERATE: :regenerate
72
+ REGEN: :regen
69
73
  FIXIT: :fixit
74
+ DO_NOTHING: :do_nothing
70
75
 
71
76
  def self?.values: -> ::Array[Deeprails::Models::DefendCreateWorkflowParams::improvement_action]
72
77
  end
@@ -82,16 +87,16 @@ module Deeprails
82
87
  def self?.values: -> ::Array[Deeprails::Models::DefendCreateWorkflowParams::type_]
83
88
  end
84
89
 
85
- type automatic_tolerance = :low | :medium | :high
90
+ type automatic_hallucination_tolerance_level = :low | :medium | :high
86
91
 
87
- module AutomaticTolerance
92
+ module AutomaticHallucinationToleranceLevel
88
93
  extend Deeprails::Internal::Type::Enum
89
94
 
90
95
  LOW: :low
91
96
  MEDIUM: :medium
92
97
  HIGH: :high
93
98
 
94
- def self?.values: -> ::Array[Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance]
99
+ def self?.values: -> ::Array[Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level]
95
100
  end
96
101
  end
97
102
  end
@@ -6,8 +6,8 @@ module Deeprails
6
6
  workflow_id: String,
7
7
  created_at: Time,
8
8
  description: String,
9
- improvement_action: Deeprails::Models::DefendResponse::improvement_action?,
10
- max_retries: Integer,
9
+ improvement_action: Deeprails::Models::DefendResponse::improvement_action,
10
+ max_improvement_attempt: Integer,
11
11
  modified_at: Time,
12
12
  status: Deeprails::Models::DefendResponse::status,
13
13
  success_rate: Float
@@ -26,11 +26,15 @@ module Deeprails
26
26
 
27
27
  def description=: (String) -> String
28
28
 
29
- attr_accessor improvement_action: Deeprails::Models::DefendResponse::improvement_action?
29
+ attr_reader improvement_action: Deeprails::Models::DefendResponse::improvement_action?
30
30
 
31
- attr_reader max_retries: Integer?
31
+ def improvement_action=: (
32
+ Deeprails::Models::DefendResponse::improvement_action
33
+ ) -> Deeprails::Models::DefendResponse::improvement_action
32
34
 
33
- def max_retries=: (Integer) -> Integer
35
+ attr_reader max_improvement_attempt: Integer?
36
+
37
+ def max_improvement_attempt=: (Integer) -> Integer
34
38
 
35
39
  attr_reader modified_at: Time?
36
40
 
@@ -51,8 +55,8 @@ module Deeprails
51
55
  workflow_id: String,
52
56
  ?created_at: Time,
53
57
  ?description: String,
54
- ?improvement_action: Deeprails::Models::DefendResponse::improvement_action?,
55
- ?max_retries: Integer,
58
+ ?improvement_action: Deeprails::Models::DefendResponse::improvement_action,
59
+ ?max_improvement_attempt: Integer,
56
60
  ?modified_at: Time,
57
61
  ?status: Deeprails::Models::DefendResponse::status,
58
62
  ?success_rate: Float
@@ -63,30 +67,31 @@ module Deeprails
63
67
  workflow_id: String,
64
68
  created_at: Time,
65
69
  description: String,
66
- improvement_action: Deeprails::Models::DefendResponse::improvement_action?,
67
- max_retries: Integer,
70
+ improvement_action: Deeprails::Models::DefendResponse::improvement_action,
71
+ max_improvement_attempt: Integer,
68
72
  modified_at: Time,
69
73
  status: Deeprails::Models::DefendResponse::status,
70
74
  success_rate: Float
71
75
  }
72
76
 
73
- type improvement_action = :regenerate | :fixit
77
+ type improvement_action = :regen | :fixit | :do_nothing
74
78
 
75
79
  module ImprovementAction
76
80
  extend Deeprails::Internal::Type::Enum
77
81
 
78
- REGENERATE: :regenerate
82
+ REGEN: :regen
79
83
  FIXIT: :fixit
84
+ DO_NOTHING: :do_nothing
80
85
 
81
86
  def self?.values: -> ::Array[Deeprails::Models::DefendResponse::improvement_action]
82
87
  end
83
88
 
84
- type status = :archived | :active
89
+ type status = :inactive | :active
85
90
 
86
91
  module Status
87
92
  extend Deeprails::Internal::Type::Enum
88
93
 
89
- ARCHIVED: :archived
94
+ INACTIVE: :inactive
90
95
  ACTIVE: :active
91
96
 
92
97
  def self?.values: -> ::Array[Deeprails::Models::DefendResponse::status]
@@ -2,13 +2,13 @@ module Deeprails
2
2
  module Resources
3
3
  class Defend
4
4
  def create_workflow: (
5
- improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action?,
6
- metrics: ::Hash[Symbol, Float],
5
+ improvement_action: Deeprails::Models::DefendCreateWorkflowParams::improvement_action,
7
6
  name: String,
8
7
  type: Deeprails::Models::DefendCreateWorkflowParams::type_,
9
- ?automatic_tolerance: Deeprails::Models::DefendCreateWorkflowParams::automatic_tolerance,
8
+ ?automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendCreateWorkflowParams::automatic_hallucination_tolerance_level],
9
+ ?custom_hallucination_threshold_values: ::Hash[Symbol, Float],
10
10
  ?description: String,
11
- ?max_retries: Integer,
11
+ ?max_improvement_attempt: Integer,
12
12
  ?request_options: Deeprails::request_opts
13
13
  ) -> Deeprails::DefendResponse
14
14
 
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.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deeprails
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-20 00:00:00.000000000 Z
11
+ date: 2025-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool