vellum_ai 0.14.80 → 0.14.82

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c136d4f431bd77bf52d7a62fc802a27a2eafd8a20e372ba03b238eee0512afd
4
- data.tar.gz: e376790be0a6a207f2d42c7e7a0c037493b1eaaae485715c23889864f5e5d57b
3
+ metadata.gz: 6e00ca20f1383ae38173743feb367ee21e43d2fd83a784b7a6dee2b433e679c5
4
+ data.tar.gz: 43a2001f0dc78332b09afca513ed514c3381aafe39dccfd71d9a07cdc4278a90
5
5
  SHA512:
6
- metadata.gz: 78abb40f1122b4ed6e503bbe30f0273da5b192b8f18a7c43031c70bc707bab34e25ac07640b3dd91d5e8947eaad6d07f3764c6c9f87434fa7ae93f1348bae7be
7
- data.tar.gz: f7102ae4ff3cb64bfd129dbf08b10ce1d5124d8491b60cd0dcbfcffda57925a03c12b9fad14f83cb55f4e37853e6c6d9f11bd9d6d1cecc9808897c7d9eca3d28
6
+ metadata.gz: 5fcb61109e27ab32952687bb360421f95cc9e4c196e32b8ab5027ca01b2cb3171936c53fde65000db8df80bb5c4bdd1b9947ac0c9d0023820bbe28c936a9df44
7
+ data.tar.gz: 80208911fffc9ffb87b008fb59e4d57c5f061666649767a1ce442c49a680e97ca33460c13f567e926aac720d83f3efb2ac0a06c7b841983aa30c7cf2e666f074
data/lib/requests.rb CHANGED
@@ -50,7 +50,7 @@ end
50
50
  end
51
51
  # @return [Hash{String => String}]
52
52
  def get_headers
53
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.80' }
53
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.82' }
54
54
  headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
55
55
  headers
56
56
  end
@@ -96,7 +96,7 @@ end
96
96
  end
97
97
  # @return [Hash{String => String}]
98
98
  def get_headers
99
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.80' }
99
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.82' }
100
100
  headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
101
101
  headers
102
102
  end
data/lib/types_export.rb CHANGED
@@ -149,6 +149,7 @@ require_relative "vellum_ai/types/execution_json_vellum_value"
149
149
  require_relative "vellum_ai/types/execution_number_vellum_value"
150
150
  require_relative "vellum_ai/types/execution_search_results_vellum_value"
151
151
  require_relative "vellum_ai/types/execution_string_vellum_value"
152
+ require_relative "vellum_ai/types/execution_thinking_vellum_value"
152
153
  require_relative "vellum_ai/types/execution_vellum_value"
153
154
  require_relative "vellum_ai/types/external_input_descriptor"
154
155
  require_relative "vellum_ai/types/external_test_case_execution"
@@ -340,6 +341,7 @@ require_relative "vellum_ai/types/prompt_node_execution_meta"
340
341
  require_relative "vellum_ai/types/prompt_node_result"
341
342
  require_relative "vellum_ai/types/prompt_node_result_data"
342
343
  require_relative "vellum_ai/types/string_vellum_value"
344
+ require_relative "vellum_ai/types/thinking_vellum_value"
343
345
  require_relative "vellum_ai/types/prompt_output"
344
346
  require_relative "vellum_ai/types/prompt_parameters"
345
347
  require_relative "vellum_ai/types/prompt_push_response"
@@ -501,6 +503,7 @@ require_relative "vellum_ai/types/test_suite_test_case_created_bulk_result_data"
501
503
  require_relative "vellum_ai/types/test_suite_test_case_delete_bulk_operation_data_request"
502
504
  require_relative "vellum_ai/types/test_suite_test_case_deleted_bulk_result_data"
503
505
  require_relative "vellum_ai/types/test_suite_test_case_replaced_bulk_result_data"
506
+ require_relative "vellum_ai/types/thinking_vellum_value_request"
504
507
  require_relative "vellum_ai/types/token_overlapping_window_chunker_config"
505
508
  require_relative "vellum_ai/types/token_overlapping_window_chunker_config_request"
506
509
  require_relative "vellum_ai/types/unit_enum"
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+ require_relative "string_vellum_value"
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vellum
7
+ # A value representing Thinking mode output.
8
+ class ExecutionThinkingVellumValue
9
+ # @return [String] The variable's uniquely identifying internal id.
10
+ attr_reader :id
11
+ # @return [String]
12
+ attr_reader :name
13
+ # @return [String]
14
+ attr_reader :type
15
+ # @return [Array<Vellum::StringVellumValue>]
16
+ attr_reader :value
17
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
18
+ attr_reader :additional_properties
19
+ # @return [Object]
20
+ attr_reader :_field_set
21
+ protected :_field_set
22
+
23
+ OMIT = Object.new
24
+
25
+ # @param id [String] The variable's uniquely identifying internal id.
26
+ # @param name [String]
27
+ # @param type [String]
28
+ # @param value [Array<Vellum::StringVellumValue>]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [Vellum::ExecutionThinkingVellumValue]
31
+ def initialize(id:, name:, type:, value:, additional_properties: nil)
32
+ @id = id
33
+ @name = name
34
+ @type = type
35
+ @value = value
36
+ @additional_properties = additional_properties
37
+ @_field_set = { "id": id, "name": name, "type": type, "value": value }
38
+ end
39
+ # Deserialize a JSON object to an instance of ExecutionThinkingVellumValue
40
+ #
41
+ # @param json_object [String]
42
+ # @return [Vellum::ExecutionThinkingVellumValue]
43
+ def self.from_json(json_object:)
44
+ struct = JSON.parse(json_object, object_class: OpenStruct)
45
+ parsed_json = JSON.parse(json_object)
46
+ id = parsed_json["id"]
47
+ name = parsed_json["name"]
48
+ type = parsed_json["type"]
49
+ value = parsed_json["value"]&.map do | item |
50
+ item = item.to_json
51
+ Vellum::StringVellumValue.from_json(json_object: item)
52
+ end
53
+ new(
54
+ id: id,
55
+ name: name,
56
+ type: type,
57
+ value: value,
58
+ additional_properties: struct
59
+ )
60
+ end
61
+ # Serialize an instance of ExecutionThinkingVellumValue to a JSON object
62
+ #
63
+ # @return [String]
64
+ def to_json
65
+ @_field_set&.to_json
66
+ end
67
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
68
+ # hash and check each fields type against the current object's property
69
+ # definitions.
70
+ #
71
+ # @param obj [Object]
72
+ # @return [Void]
73
+ def self.validate_raw(obj:)
74
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
75
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
76
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
77
+ obj.value.is_a?(Array) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
78
+ end
79
+ end
80
+ end
@@ -8,6 +8,7 @@ require_relative "execution_search_results_vellum_value"
8
8
  require_relative "execution_error_vellum_value"
9
9
  require_relative "execution_array_vellum_value"
10
10
  require_relative "execution_function_call_vellum_value"
11
+ require_relative "execution_thinking_vellum_value"
11
12
 
12
13
  module Vellum
13
14
  class ExecutionVellumValue
@@ -95,6 +96,16 @@ end
95
96
  return Vellum::ExecutionFunctionCallVellumValue.from_json(json_object: struct)
96
97
  else
97
98
  return nil
99
+ end
100
+ rescue StandardError
101
+ # noop
102
+ end
103
+ begin
104
+ Vellum::ExecutionThinkingVellumValue.validate_raw(obj: struct)
105
+ unless struct.nil?
106
+ return Vellum::ExecutionThinkingVellumValue.from_json(json_object: struct)
107
+ else
108
+ return nil
98
109
  end
99
110
  rescue StandardError
100
111
  # noop
@@ -148,6 +159,11 @@ end
148
159
  rescue StandardError
149
160
  # noop
150
161
  end
162
+ begin
163
+ return Vellum::ExecutionThinkingVellumValue.validate_raw(obj: obj)
164
+ rescue StandardError
165
+ # noop
166
+ end
151
167
  raise("Passed value matched no type within the union, validation failed.")
152
168
  end
153
169
  end
@@ -4,6 +4,7 @@ require_relative "string_vellum_value"
4
4
  require_relative "json_vellum_value"
5
5
  require_relative "error_vellum_value"
6
6
  require_relative "function_call_vellum_value"
7
+ require_relative "thinking_vellum_value"
7
8
 
8
9
  module Vellum
9
10
  class PromptOutput
@@ -51,6 +52,16 @@ end
51
52
  return Vellum::FunctionCallVellumValue.from_json(json_object: struct)
52
53
  else
53
54
  return nil
55
+ end
56
+ rescue StandardError
57
+ # noop
58
+ end
59
+ begin
60
+ Vellum::ThinkingVellumValue.validate_raw(obj: struct)
61
+ unless struct.nil?
62
+ return Vellum::ThinkingVellumValue.from_json(json_object: struct)
63
+ else
64
+ return nil
54
65
  end
55
66
  rescue StandardError
56
67
  # noop
@@ -84,6 +95,11 @@ end
84
95
  rescue StandardError
85
96
  # noop
86
97
  end
98
+ begin
99
+ return Vellum::ThinkingVellumValue.validate_raw(obj: obj)
100
+ rescue StandardError
101
+ # noop
102
+ end
87
103
  raise("Passed value matched no type within the union, validation failed.")
88
104
  end
89
105
  end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+ require_relative "string_vellum_value"
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vellum
7
+ # A value representing Thinking mode output.
8
+ class ThinkingVellumValue
9
+ # @return [String]
10
+ attr_reader :type
11
+ # @return [Array<Vellum::StringVellumValue>]
12
+ attr_reader :value
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param type [String]
22
+ # @param value [Array<Vellum::StringVellumValue>]
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [Vellum::ThinkingVellumValue]
25
+ def initialize(type:, value:, additional_properties: nil)
26
+ @type = type
27
+ @value = value
28
+ @additional_properties = additional_properties
29
+ @_field_set = { "type": type, "value": value }
30
+ end
31
+ # Deserialize a JSON object to an instance of ThinkingVellumValue
32
+ #
33
+ # @param json_object [String]
34
+ # @return [Vellum::ThinkingVellumValue]
35
+ def self.from_json(json_object:)
36
+ struct = JSON.parse(json_object, object_class: OpenStruct)
37
+ parsed_json = JSON.parse(json_object)
38
+ type = parsed_json["type"]
39
+ value = parsed_json["value"]&.map do | item |
40
+ item = item.to_json
41
+ Vellum::StringVellumValue.from_json(json_object: item)
42
+ end
43
+ new(
44
+ type: type,
45
+ value: value,
46
+ additional_properties: struct
47
+ )
48
+ end
49
+ # Serialize an instance of ThinkingVellumValue to a JSON object
50
+ #
51
+ # @return [String]
52
+ def to_json
53
+ @_field_set&.to_json
54
+ end
55
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
56
+ # hash and check each fields type against the current object's property
57
+ # definitions.
58
+ #
59
+ # @param obj [Object]
60
+ # @return [Void]
61
+ def self.validate_raw(obj:)
62
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
63
+ obj.value.is_a?(Array) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+ require_relative "string_vellum_value_request"
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vellum
7
+ # A value representing Thinking mode output.
8
+ class ThinkingVellumValueRequest
9
+ # @return [String]
10
+ attr_reader :type
11
+ # @return [Array<Vellum::StringVellumValueRequest>]
12
+ attr_reader :value
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param type [String]
22
+ # @param value [Array<Vellum::StringVellumValueRequest>]
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [Vellum::ThinkingVellumValueRequest]
25
+ def initialize(type:, value:, additional_properties: nil)
26
+ @type = type
27
+ @value = value
28
+ @additional_properties = additional_properties
29
+ @_field_set = { "type": type, "value": value }
30
+ end
31
+ # Deserialize a JSON object to an instance of ThinkingVellumValueRequest
32
+ #
33
+ # @param json_object [String]
34
+ # @return [Vellum::ThinkingVellumValueRequest]
35
+ def self.from_json(json_object:)
36
+ struct = JSON.parse(json_object, object_class: OpenStruct)
37
+ parsed_json = JSON.parse(json_object)
38
+ type = parsed_json["type"]
39
+ value = parsed_json["value"]&.map do | item |
40
+ item = item.to_json
41
+ Vellum::StringVellumValueRequest.from_json(json_object: item)
42
+ end
43
+ new(
44
+ type: type,
45
+ value: value,
46
+ additional_properties: struct
47
+ )
48
+ end
49
+ # Serialize an instance of ThinkingVellumValueRequest to a JSON object
50
+ #
51
+ # @return [String]
52
+ def to_json
53
+ @_field_set&.to_json
54
+ end
55
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
56
+ # hash and check each fields type against the current object's property
57
+ # definitions.
58
+ #
59
+ # @param obj [Object]
60
+ # @return [Void]
61
+ def self.validate_raw(obj:)
62
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
63
+ obj.value.is_a?(Array) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
64
+ end
65
+ end
66
+ end
@@ -11,6 +11,7 @@ require_relative "error_vellum_value"
11
11
  require_relative "array_vellum_value"
12
12
  require_relative "chat_history_vellum_value"
13
13
  require_relative "search_results_vellum_value"
14
+ require_relative "thinking_vellum_value"
14
15
 
15
16
  module Vellum
16
17
  class VellumValue
@@ -128,6 +129,16 @@ end
128
129
  return Vellum::SearchResultsVellumValue.from_json(json_object: struct)
129
130
  else
130
131
  return nil
132
+ end
133
+ rescue StandardError
134
+ # noop
135
+ end
136
+ begin
137
+ Vellum::ThinkingVellumValue.validate_raw(obj: struct)
138
+ unless struct.nil?
139
+ return Vellum::ThinkingVellumValue.from_json(json_object: struct)
140
+ else
141
+ return nil
131
142
  end
132
143
  rescue StandardError
133
144
  # noop
@@ -196,6 +207,11 @@ end
196
207
  rescue StandardError
197
208
  # noop
198
209
  end
210
+ begin
211
+ return Vellum::ThinkingVellumValue.validate_raw(obj: obj)
212
+ rescue StandardError
213
+ # noop
214
+ end
199
215
  raise("Passed value matched no type within the union, validation failed.")
200
216
  end
201
217
  end
@@ -11,6 +11,7 @@ require_relative "error_vellum_value_request"
11
11
  require_relative "array_vellum_value_request"
12
12
  require_relative "chat_history_vellum_value_request"
13
13
  require_relative "search_results_vellum_value_request"
14
+ require_relative "thinking_vellum_value_request"
14
15
 
15
16
  module Vellum
16
17
  class VellumValueRequest
@@ -128,6 +129,16 @@ end
128
129
  return Vellum::SearchResultsVellumValueRequest.from_json(json_object: struct)
129
130
  else
130
131
  return nil
132
+ end
133
+ rescue StandardError
134
+ # noop
135
+ end
136
+ begin
137
+ Vellum::ThinkingVellumValueRequest.validate_raw(obj: struct)
138
+ unless struct.nil?
139
+ return Vellum::ThinkingVellumValueRequest.from_json(json_object: struct)
140
+ else
141
+ return nil
131
142
  end
132
143
  rescue StandardError
133
144
  # noop
@@ -196,6 +207,11 @@ end
196
207
  rescue StandardError
197
208
  # noop
198
209
  end
210
+ begin
211
+ return Vellum::ThinkingVellumValueRequest.validate_raw(obj: obj)
212
+ rescue StandardError
213
+ # noop
214
+ end
199
215
  raise("Passed value matched no type within the union, validation failed.")
200
216
  end
201
217
  end
@@ -13,6 +13,7 @@ module Vellum
13
13
  # * `AUDIO` - AUDIO
14
14
  # * `DOCUMENT` - DOCUMENT
15
15
  # * `NULL` - NULL
16
+ # * `THINKING` - THINKING
16
17
  class VellumVariableType
17
18
 
18
19
  STRING = "STRING"
@@ -27,6 +28,7 @@ module Vellum
27
28
  AUDIO = "AUDIO"
28
29
  DOCUMENT = "DOCUMENT"
29
30
  NULL = "NULL"
31
+ THINKING = "THINKING"
30
32
 
31
33
  end
32
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vellum_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.80
4
+ version: 0.14.82
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vellum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-30 00:00:00.000000000 Z
11
+ date: 2025-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -271,6 +271,7 @@ files:
271
271
  - lib/vellum_ai/types/execution_number_vellum_value.rb
272
272
  - lib/vellum_ai/types/execution_search_results_vellum_value.rb
273
273
  - lib/vellum_ai/types/execution_string_vellum_value.rb
274
+ - lib/vellum_ai/types/execution_thinking_vellum_value.rb
274
275
  - lib/vellum_ai/types/execution_vellum_value.rb
275
276
  - lib/vellum_ai/types/external_input_descriptor.rb
276
277
  - lib/vellum_ai/types/external_test_case_execution.rb
@@ -637,6 +638,8 @@ files:
637
638
  - lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result.rb
638
639
  - lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result_data.rb
639
640
  - lib/vellum_ai/types/test_suite_test_case_upsert_bulk_operation_request.rb
641
+ - lib/vellum_ai/types/thinking_vellum_value.rb
642
+ - lib/vellum_ai/types/thinking_vellum_value_request.rb
640
643
  - lib/vellum_ai/types/token_overlapping_window_chunker_config.rb
641
644
  - lib/vellum_ai/types/token_overlapping_window_chunker_config_request.rb
642
645
  - lib/vellum_ai/types/token_overlapping_window_chunking.rb