vellum_ai 0.14.81 → 0.14.83

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: 2f1d9307a184a2ecce416e117dd9f510cb6947738bcf488736883a9ddbebe1e4
4
- data.tar.gz: 4c7cc0bcd6329357b4bcf687a8cf793e7df687aab407b6ffb209dd6906833c38
3
+ metadata.gz: 12faa069a902250dda9fb5bbc0a9dc76fec48ff6327614f58a606f74f3ce1615
4
+ data.tar.gz: 40d3adc1e9c92de0d4e032c7baa6e9ae790ff25a2af2c4453649968723bb2d74
5
5
  SHA512:
6
- metadata.gz: a88a2f3d89bee9f9455ce12d268d397cb84a59f36d06ee450ce2b24934c7900c12c22ba54c21620f500ed6697a6572df9365b227b1eb50518bee4d969446b724
7
- data.tar.gz: 2c04445c1cee914b8fdf3e09fa9cc583569cc9b8d19b7028c4a4b93e7145838225fef529a96442a5505fd7d67f928ba2bade84965b84b167da484dcb00b221e2
6
+ metadata.gz: 4c4d85cf3f75fab6f5fdd3669cd8fc9ca0b7d631276b92887254228c0af84cfc9087b7ddb6a3399b1fb01c139b8ceb34a0217e30b566d3a4022abe61f326a849
7
+ data.tar.gz: ac7377780ca444faf3c7be13c4be82a997b80f0548f6b37bd44cd99acead197da8dd821f5222505b4bf06a4867b2b0134f31cbb2b68e444918d85610354e7dcc
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.81' }
53
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.83' }
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.81' }
99
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.83' }
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"
@@ -190,6 +191,8 @@ require_relative "vellum_ai/types/generate_stream_result"
190
191
  require_relative "vellum_ai/types/generate_stream_result_data"
191
192
  require_relative "vellum_ai/types/google_vertex_ai_vectorizer_config"
192
193
  require_relative "vellum_ai/types/google_vertex_ai_vectorizer_config_request"
194
+ require_relative "vellum_ai/types/google_vertex_ai_vectorizer_gemini_embedding_001"
195
+ require_relative "vellum_ai/types/google_vertex_ai_vectorizer_gemini_embedding_001_request"
193
196
  require_relative "vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004"
194
197
  require_relative "vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004_request"
195
198
  require_relative "vellum_ai/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002"
@@ -340,6 +343,7 @@ require_relative "vellum_ai/types/prompt_node_execution_meta"
340
343
  require_relative "vellum_ai/types/prompt_node_result"
341
344
  require_relative "vellum_ai/types/prompt_node_result_data"
342
345
  require_relative "vellum_ai/types/string_vellum_value"
346
+ require_relative "vellum_ai/types/thinking_vellum_value"
343
347
  require_relative "vellum_ai/types/prompt_output"
344
348
  require_relative "vellum_ai/types/prompt_parameters"
345
349
  require_relative "vellum_ai/types/prompt_push_response"
@@ -501,6 +505,7 @@ require_relative "vellum_ai/types/test_suite_test_case_created_bulk_result_data"
501
505
  require_relative "vellum_ai/types/test_suite_test_case_delete_bulk_operation_data_request"
502
506
  require_relative "vellum_ai/types/test_suite_test_case_deleted_bulk_result_data"
503
507
  require_relative "vellum_ai/types/test_suite_test_case_replaced_bulk_result_data"
508
+ require_relative "vellum_ai/types/thinking_vellum_value_request"
504
509
  require_relative "vellum_ai/types/token_overlapping_window_chunker_config"
505
510
  require_relative "vellum_ai/types/token_overlapping_window_chunker_config_request"
506
511
  require_relative "vellum_ai/types/unit_enum"
@@ -129,6 +129,8 @@ end
129
129
  # file's file name.
130
130
  # @param status [Vellum::DOCUMENT_STATUS] The current status of the document
131
131
  # * `ACTIVE` - Active
132
+ # @param keywords [Array<String>] A list of keywords that'll be associated with the document. Used as part of
133
+ # keyword search.
132
134
  # @param metadata [Hash{String => Object}] A JSON object containing any metadata associated with the document that you'd
133
135
  # like to filter upon later.
134
136
  # @param request_options [Vellum::RequestOptions]
@@ -140,7 +142,7 @@ end
140
142
  # api_key: "YOUR_API_KEY"
141
143
  # )
142
144
  # api.documents.partial_update(id: "id")
143
- def partial_update(id:, label: nil, status: nil, metadata: nil, request_options: nil)
145
+ def partial_update(id:, label: nil, status: nil, keywords: nil, metadata: nil, request_options: nil)
144
146
  response = @request_client.conn.patch do | req |
145
147
  unless request_options&.timeout_in_seconds.nil?
146
148
  req.options.timeout = request_options.timeout_in_seconds
@@ -152,7 +154,7 @@ end
152
154
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
153
155
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
154
156
  end
155
- req.body = { **(request_options&.additional_body_parameters || {}), label: label, status: status, metadata: metadata }.compact
157
+ req.body = { **(request_options&.additional_body_parameters || {}), label: label, status: status, keywords: keywords, metadata: metadata }.compact
156
158
  req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/documents/#{id}"
157
159
  end
158
160
  Vellum::DocumentRead.from_json(json_object: response.body)
@@ -320,6 +322,8 @@ end
320
322
  # file's file name.
321
323
  # @param status [Vellum::DOCUMENT_STATUS] The current status of the document
322
324
  # * `ACTIVE` - Active
325
+ # @param keywords [Array<String>] A list of keywords that'll be associated with the document. Used as part of
326
+ # keyword search.
323
327
  # @param metadata [Hash{String => Object}] A JSON object containing any metadata associated with the document that you'd
324
328
  # like to filter upon later.
325
329
  # @param request_options [Vellum::RequestOptions]
@@ -331,7 +335,7 @@ end
331
335
  # api_key: "YOUR_API_KEY"
332
336
  # )
333
337
  # api.documents.partial_update(id: "id")
334
- def partial_update(id:, label: nil, status: nil, metadata: nil, request_options: nil)
338
+ def partial_update(id:, label: nil, status: nil, keywords: nil, metadata: nil, request_options: nil)
335
339
  Async do
336
340
  response = @request_client.conn.patch do | req |
337
341
  unless request_options&.timeout_in_seconds.nil?
@@ -344,7 +348,7 @@ end
344
348
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
345
349
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
346
350
  end
347
- req.body = { **(request_options&.additional_body_parameters || {}), label: label, status: status, metadata: metadata }.compact
351
+ req.body = { **(request_options&.additional_body_parameters || {}), label: label, status: status, keywords: keywords, metadata: metadata }.compact
348
352
  req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/documents/#{id}"
349
353
  end
350
354
  Vellum::DocumentRead.from_json(json_object: response.body)
@@ -7,6 +7,8 @@ module Vellum
7
7
  class ContainerImageBuildConfig
8
8
  # @return [Array<Vellum::CodeExecutionPackage>]
9
9
  attr_reader :packages
10
+ # @return [String]
11
+ attr_reader :user_script
10
12
  # @return [OpenStruct] Additional properties unmapped to the current class definition
11
13
  attr_reader :additional_properties
12
14
  # @return [Object]
@@ -16,12 +18,16 @@ module Vellum
16
18
  OMIT = Object.new
17
19
 
18
20
  # @param packages [Array<Vellum::CodeExecutionPackage>]
21
+ # @param user_script [String]
19
22
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
20
23
  # @return [Vellum::ContainerImageBuildConfig]
21
- def initialize(packages:, additional_properties: nil)
24
+ def initialize(packages:, user_script: OMIT, additional_properties: nil)
22
25
  @packages = packages
26
+ @user_script = user_script if user_script != OMIT
23
27
  @additional_properties = additional_properties
24
- @_field_set = { "packages": packages }
28
+ @_field_set = { "packages": packages, "user_script": user_script }.reject do | _k, v |
29
+ v == OMIT
30
+ end
25
31
  end
26
32
  # Deserialize a JSON object to an instance of ContainerImageBuildConfig
27
33
  #
@@ -34,7 +40,12 @@ module Vellum
34
40
  item = item.to_json
35
41
  Vellum::CodeExecutionPackage.from_json(json_object: item)
36
42
  end
37
- new(packages: packages, additional_properties: struct)
43
+ user_script = parsed_json["user_script"]
44
+ new(
45
+ packages: packages,
46
+ user_script: user_script,
47
+ additional_properties: struct
48
+ )
38
49
  end
39
50
  # Serialize an instance of ContainerImageBuildConfig to a JSON object
40
51
  #
@@ -50,6 +61,7 @@ end
50
61
  # @return [Void]
51
62
  def self.validate_raw(obj:)
52
63
  obj.packages.is_a?(Array) != false || raise("Passed value for field obj.packages is not the expected type, validation failed.")
64
+ obj.user_script&.is_a?(String) != false || raise("Passed value for field obj.user_script is not the expected type, validation failed.")
53
65
  end
54
66
  end
55
67
  end
@@ -22,6 +22,9 @@ module Vellum
22
22
  # @return [Vellum::DOCUMENT_STATUS] The current status of the document
23
23
  # * `ACTIVE` - Active
24
24
  attr_reader :status
25
+ # @return [Array<String>] A list of keywords that'll be associated with the document. Used as part of
26
+ # keyword search.
27
+ attr_reader :keywords
25
28
  # @return [String]
26
29
  attr_reader :original_file_url
27
30
  # @return [Array<Vellum::DocumentDocumentToDocumentIndex>]
@@ -45,24 +48,27 @@ module Vellum
45
48
  # @param processing_state [Vellum::DocumentProcessingState]
46
49
  # @param status [Vellum::DOCUMENT_STATUS] The current status of the document
47
50
  # * `ACTIVE` - Active
51
+ # @param keywords [Array<String>] A list of keywords that'll be associated with the document. Used as part of
52
+ # keyword search.
48
53
  # @param original_file_url [String]
49
54
  # @param document_to_document_indexes [Array<Vellum::DocumentDocumentToDocumentIndex>]
50
55
  # @param metadata [Hash{String => Object}] A previously supplied JSON object containing metadata that can be filtered on
51
56
  # when searching.
52
57
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
53
58
  # @return [Vellum::DocumentRead]
54
- def initialize(id:, external_id: OMIT, last_uploaded_at:, label:, processing_state:, status: OMIT, original_file_url: OMIT, document_to_document_indexes:, metadata: OMIT, additional_properties: nil)
59
+ def initialize(id:, external_id: OMIT, last_uploaded_at:, label:, processing_state:, status: OMIT, keywords: OMIT, original_file_url: OMIT, document_to_document_indexes:, metadata: OMIT, additional_properties: nil)
55
60
  @id = id
56
61
  @external_id = external_id if external_id != OMIT
57
62
  @last_uploaded_at = last_uploaded_at
58
63
  @label = label
59
64
  @processing_state = processing_state
60
65
  @status = status if status != OMIT
66
+ @keywords = keywords if keywords != OMIT
61
67
  @original_file_url = original_file_url if original_file_url != OMIT
62
68
  @document_to_document_indexes = document_to_document_indexes
63
69
  @metadata = metadata if metadata != OMIT
64
70
  @additional_properties = additional_properties
65
- @_field_set = { "id": id, "external_id": external_id, "last_uploaded_at": last_uploaded_at, "label": label, "processing_state": processing_state, "status": status, "original_file_url": original_file_url, "document_to_document_indexes": document_to_document_indexes, "metadata": metadata }.reject do | _k, v |
71
+ @_field_set = { "id": id, "external_id": external_id, "last_uploaded_at": last_uploaded_at, "label": label, "processing_state": processing_state, "status": status, "keywords": keywords, "original_file_url": original_file_url, "document_to_document_indexes": document_to_document_indexes, "metadata": metadata }.reject do | _k, v |
66
72
  v == OMIT
67
73
  end
68
74
  end
@@ -83,6 +89,7 @@ end
83
89
  label = parsed_json["label"]
84
90
  processing_state = parsed_json["processing_state"]
85
91
  status = parsed_json["status"]
92
+ keywords = parsed_json["keywords"]
86
93
  original_file_url = parsed_json["original_file_url"]
87
94
  document_to_document_indexes = parsed_json["document_to_document_indexes"]&.map do | item |
88
95
  item = item.to_json
@@ -96,6 +103,7 @@ end
96
103
  label: label,
97
104
  processing_state: processing_state,
98
105
  status: status,
106
+ keywords: keywords,
99
107
  original_file_url: original_file_url,
100
108
  document_to_document_indexes: document_to_document_indexes,
101
109
  metadata: metadata,
@@ -121,6 +129,7 @@ end
121
129
  obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
122
130
  obj.processing_state.is_a?(Vellum::DocumentProcessingState) != false || raise("Passed value for field obj.processing_state is not the expected type, validation failed.")
123
131
  obj.status&.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
132
+ obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
124
133
  obj.original_file_url&.is_a?(String) != false || raise("Passed value for field obj.original_file_url is not the expected type, validation failed.")
125
134
  obj.document_to_document_indexes.is_a?(Array) != false || raise("Passed value for field obj.document_to_document_indexes is not the expected type, validation failed.")
126
135
  obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
@@ -0,0 +1,82 @@
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 [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 [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
+ unless parsed_json["value"].nil?
50
+ value = parsed_json["value"].to_json
51
+ value = Vellum::StringVellumValue.from_json(json_object: value)
52
+ else
53
+ value = nil
54
+ end
55
+ new(
56
+ id: id,
57
+ name: name,
58
+ type: type,
59
+ value: value,
60
+ additional_properties: struct
61
+ )
62
+ end
63
+ # Serialize an instance of ExecutionThinkingVellumValue to a JSON object
64
+ #
65
+ # @return [String]
66
+ def to_json
67
+ @_field_set&.to_json
68
+ end
69
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
70
+ # hash and check each fields type against the current object's property
71
+ # definitions.
72
+ #
73
+ # @param obj [Object]
74
+ # @return [Void]
75
+ def self.validate_raw(obj:)
76
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
77
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
78
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
79
+ Vellum::StringVellumValue.validate_raw(obj: obj.value)
80
+ end
81
+ end
82
+ 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
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+ require_relative "google_vertex_ai_vectorizer_config"
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vellum
7
+ class GoogleVertexAiVectorizerGeminiEmbedding001
8
+ # @return [String]
9
+ attr_reader :model_name
10
+ # @return [Vellum::GoogleVertexAiVectorizerConfig]
11
+ attr_reader :config
12
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
13
+ attr_reader :additional_properties
14
+ # @return [Object]
15
+ attr_reader :_field_set
16
+ protected :_field_set
17
+
18
+ OMIT = Object.new
19
+
20
+ # @param model_name [String]
21
+ # @param config [Vellum::GoogleVertexAiVectorizerConfig]
22
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
23
+ # @return [Vellum::GoogleVertexAiVectorizerGeminiEmbedding001]
24
+ def initialize(model_name:, config:, additional_properties: nil)
25
+ @model_name = model_name
26
+ @config = config
27
+ @additional_properties = additional_properties
28
+ @_field_set = { "model_name": model_name, "config": config }
29
+ end
30
+ # Deserialize a JSON object to an instance of
31
+ # GoogleVertexAiVectorizerGeminiEmbedding001
32
+ #
33
+ # @param json_object [String]
34
+ # @return [Vellum::GoogleVertexAiVectorizerGeminiEmbedding001]
35
+ def self.from_json(json_object:)
36
+ struct = JSON.parse(json_object, object_class: OpenStruct)
37
+ parsed_json = JSON.parse(json_object)
38
+ model_name = parsed_json["model_name"]
39
+ unless parsed_json["config"].nil?
40
+ config = parsed_json["config"].to_json
41
+ config = Vellum::GoogleVertexAiVectorizerConfig.from_json(json_object: config)
42
+ else
43
+ config = nil
44
+ end
45
+ new(
46
+ model_name: model_name,
47
+ config: config,
48
+ additional_properties: struct
49
+ )
50
+ end
51
+ # Serialize an instance of GoogleVertexAiVectorizerGeminiEmbedding001 to a JSON
52
+ # object
53
+ #
54
+ # @return [String]
55
+ def to_json
56
+ @_field_set&.to_json
57
+ end
58
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
59
+ # hash and check each fields type against the current object's property
60
+ # definitions.
61
+ #
62
+ # @param obj [Object]
63
+ # @return [Void]
64
+ def self.validate_raw(obj:)
65
+ obj.model_name.is_a?(String) != false || raise("Passed value for field obj.model_name is not the expected type, validation failed.")
66
+ Vellum::GoogleVertexAiVectorizerConfig.validate_raw(obj: obj.config)
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+ require_relative "google_vertex_ai_vectorizer_config_request"
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vellum
7
+ class GoogleVertexAiVectorizerGeminiEmbedding001Request
8
+ # @return [String]
9
+ attr_reader :model_name
10
+ # @return [Vellum::GoogleVertexAiVectorizerConfigRequest]
11
+ attr_reader :config
12
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
13
+ attr_reader :additional_properties
14
+ # @return [Object]
15
+ attr_reader :_field_set
16
+ protected :_field_set
17
+
18
+ OMIT = Object.new
19
+
20
+ # @param model_name [String]
21
+ # @param config [Vellum::GoogleVertexAiVectorizerConfigRequest]
22
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
23
+ # @return [Vellum::GoogleVertexAiVectorizerGeminiEmbedding001Request]
24
+ def initialize(model_name:, config:, additional_properties: nil)
25
+ @model_name = model_name
26
+ @config = config
27
+ @additional_properties = additional_properties
28
+ @_field_set = { "model_name": model_name, "config": config }
29
+ end
30
+ # Deserialize a JSON object to an instance of
31
+ # GoogleVertexAiVectorizerGeminiEmbedding001Request
32
+ #
33
+ # @param json_object [String]
34
+ # @return [Vellum::GoogleVertexAiVectorizerGeminiEmbedding001Request]
35
+ def self.from_json(json_object:)
36
+ struct = JSON.parse(json_object, object_class: OpenStruct)
37
+ parsed_json = JSON.parse(json_object)
38
+ model_name = parsed_json["model_name"]
39
+ unless parsed_json["config"].nil?
40
+ config = parsed_json["config"].to_json
41
+ config = Vellum::GoogleVertexAiVectorizerConfigRequest.from_json(json_object: config)
42
+ else
43
+ config = nil
44
+ end
45
+ new(
46
+ model_name: model_name,
47
+ config: config,
48
+ additional_properties: struct
49
+ )
50
+ end
51
+ # Serialize an instance of GoogleVertexAiVectorizerGeminiEmbedding001Request to a
52
+ # JSON object
53
+ #
54
+ # @return [String]
55
+ def to_json
56
+ @_field_set&.to_json
57
+ end
58
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
59
+ # hash and check each fields type against the current object's property
60
+ # definitions.
61
+ #
62
+ # @param obj [Object]
63
+ # @return [Void]
64
+ def self.validate_raw(obj:)
65
+ obj.model_name.is_a?(String) != false || raise("Passed value for field obj.model_name is not the expected type, validation failed.")
66
+ Vellum::GoogleVertexAiVectorizerConfigRequest.validate_raw(obj: obj.config)
67
+ end
68
+ end
69
+ end
@@ -9,6 +9,7 @@ require_relative "basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot
9
9
  require_relative "hkunlp_instructor_xl_vectorizer"
10
10
  require_relative "google_vertex_ai_vectorizer_text_embedding_004"
11
11
  require_relative "google_vertex_ai_vectorizer_text_multilingual_embedding_002"
12
+ require_relative "google_vertex_ai_vectorizer_gemini_embedding_001"
12
13
  require_relative "fast_embed_vectorizer_baai_bge_small_en_v_15"
13
14
 
14
15
  module Vellum
@@ -107,6 +108,16 @@ end
107
108
  return Vellum::GoogleVertexAiVectorizerTextMultilingualEmbedding002.from_json(json_object: struct)
108
109
  else
109
110
  return nil
111
+ end
112
+ rescue StandardError
113
+ # noop
114
+ end
115
+ begin
116
+ Vellum::GoogleVertexAiVectorizerGeminiEmbedding001.validate_raw(obj: struct)
117
+ unless struct.nil?
118
+ return Vellum::GoogleVertexAiVectorizerGeminiEmbedding001.from_json(json_object: struct)
119
+ else
120
+ return nil
110
121
  end
111
122
  rescue StandardError
112
123
  # noop
@@ -175,6 +186,11 @@ end
175
186
  rescue StandardError
176
187
  # noop
177
188
  end
189
+ begin
190
+ return Vellum::GoogleVertexAiVectorizerGeminiEmbedding001.validate_raw(obj: obj)
191
+ rescue StandardError
192
+ # noop
193
+ end
178
194
  begin
179
195
  return Vellum::FastEmbedVectorizerBaaiBgeSmallEnV15.validate_raw(obj: obj)
180
196
  rescue StandardError
@@ -9,6 +9,7 @@ require_relative "basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot
9
9
  require_relative "hkunlp_instructor_xl_vectorizer_request"
10
10
  require_relative "google_vertex_ai_vectorizer_text_embedding_004_request"
11
11
  require_relative "google_vertex_ai_vectorizer_text_multilingual_embedding_002_request"
12
+ require_relative "google_vertex_ai_vectorizer_gemini_embedding_001_request"
12
13
  require_relative "fast_embed_vectorizer_baai_bge_small_en_v_15_request"
13
14
 
14
15
  module Vellum
@@ -107,6 +108,16 @@ end
107
108
  return Vellum::GoogleVertexAiVectorizerTextMultilingualEmbedding002Request.from_json(json_object: struct)
108
109
  else
109
110
  return nil
111
+ end
112
+ rescue StandardError
113
+ # noop
114
+ end
115
+ begin
116
+ Vellum::GoogleVertexAiVectorizerGeminiEmbedding001Request.validate_raw(obj: struct)
117
+ unless struct.nil?
118
+ return Vellum::GoogleVertexAiVectorizerGeminiEmbedding001Request.from_json(json_object: struct)
119
+ else
120
+ return nil
110
121
  end
111
122
  rescue StandardError
112
123
  # noop
@@ -175,6 +186,11 @@ end
175
186
  rescue StandardError
176
187
  # noop
177
188
  end
189
+ begin
190
+ return Vellum::GoogleVertexAiVectorizerGeminiEmbedding001Request.validate_raw(obj: obj)
191
+ rescue StandardError
192
+ # noop
193
+ end
178
194
  begin
179
195
  return Vellum::FastEmbedVectorizerBaaiBgeSmallEnV15Request.validate_raw(obj: obj)
180
196
  rescue StandardError
@@ -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,68 @@
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 [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 [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
+ unless parsed_json["value"].nil?
40
+ value = parsed_json["value"].to_json
41
+ value = Vellum::StringVellumValue.from_json(json_object: value)
42
+ else
43
+ value = nil
44
+ end
45
+ new(
46
+ type: type,
47
+ value: value,
48
+ additional_properties: struct
49
+ )
50
+ end
51
+ # Serialize an instance of ThinkingVellumValue to a JSON object
52
+ #
53
+ # @return [String]
54
+ def to_json
55
+ @_field_set&.to_json
56
+ end
57
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
58
+ # hash and check each fields type against the current object's property
59
+ # definitions.
60
+ #
61
+ # @param obj [Object]
62
+ # @return [Void]
63
+ def self.validate_raw(obj:)
64
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
65
+ Vellum::StringVellumValue.validate_raw(obj: obj.value)
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,68 @@
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 [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 [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
+ unless parsed_json["value"].nil?
40
+ value = parsed_json["value"].to_json
41
+ value = Vellum::StringVellumValueRequest.from_json(json_object: value)
42
+ else
43
+ value = nil
44
+ end
45
+ new(
46
+ type: type,
47
+ value: value,
48
+ additional_properties: struct
49
+ )
50
+ end
51
+ # Serialize an instance of ThinkingVellumValueRequest to a JSON object
52
+ #
53
+ # @return [String]
54
+ def to_json
55
+ @_field_set&.to_json
56
+ end
57
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
58
+ # hash and check each fields type against the current object's property
59
+ # definitions.
60
+ #
61
+ # @param obj [Object]
62
+ # @return [Void]
63
+ def self.validate_raw(obj:)
64
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
65
+ Vellum::StringVellumValueRequest.validate_raw(obj: obj.value)
66
+ end
67
+ end
68
+ 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
@@ -12,6 +12,10 @@ module Vellum
12
12
  attr_reader :description
13
13
  # @return [String]
14
14
  attr_reader :icon_name
15
+ # @return [String]
16
+ attr_reader :ui_image_url
17
+ # @return [String]
18
+ attr_reader :code_image_url
15
19
  # @return [OpenStruct] Additional properties unmapped to the current class definition
16
20
  attr_reader :additional_properties
17
21
  # @return [Object]
@@ -24,15 +28,19 @@ module Vellum
24
28
  # @param label [String]
25
29
  # @param description [String]
26
30
  # @param icon_name [String]
31
+ # @param ui_image_url [String]
32
+ # @param code_image_url [String]
27
33
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
28
34
  # @return [Vellum::WorkflowSandboxExample]
29
- def initialize(id:, label:, description: OMIT, icon_name: OMIT, additional_properties: nil)
35
+ def initialize(id:, label:, description: OMIT, icon_name: OMIT, ui_image_url: OMIT, code_image_url: OMIT, additional_properties: nil)
30
36
  @id = id
31
37
  @label = label
32
38
  @description = description if description != OMIT
33
39
  @icon_name = icon_name if icon_name != OMIT
40
+ @ui_image_url = ui_image_url if ui_image_url != OMIT
41
+ @code_image_url = code_image_url if code_image_url != OMIT
34
42
  @additional_properties = additional_properties
35
- @_field_set = { "id": id, "label": label, "description": description, "icon_name": icon_name }.reject do | _k, v |
43
+ @_field_set = { "id": id, "label": label, "description": description, "icon_name": icon_name, "ui_image_url": ui_image_url, "code_image_url": code_image_url }.reject do | _k, v |
36
44
  v == OMIT
37
45
  end
38
46
  end
@@ -47,11 +55,15 @@ end
47
55
  label = parsed_json["label"]
48
56
  description = parsed_json["description"]
49
57
  icon_name = parsed_json["icon_name"]
58
+ ui_image_url = parsed_json["ui_image_url"]
59
+ code_image_url = parsed_json["code_image_url"]
50
60
  new(
51
61
  id: id,
52
62
  label: label,
53
63
  description: description,
54
64
  icon_name: icon_name,
65
+ ui_image_url: ui_image_url,
66
+ code_image_url: code_image_url,
55
67
  additional_properties: struct
56
68
  )
57
69
  end
@@ -72,6 +84,8 @@ end
72
84
  obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
73
85
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
74
86
  obj.icon_name&.is_a?(String) != false || raise("Passed value for field obj.icon_name is not the expected type, validation failed.")
87
+ obj.ui_image_url&.is_a?(String) != false || raise("Passed value for field obj.ui_image_url is not the expected type, validation failed.")
88
+ obj.code_image_url&.is_a?(String) != false || raise("Passed value for field obj.code_image_url is not the expected type, validation failed.")
75
89
  end
76
90
  end
77
91
  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.81
4
+ version: 0.14.83
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vellum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-01 00:00:00.000000000 Z
11
+ date: 2025-07-08 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
@@ -319,6 +320,8 @@ files:
319
320
  - lib/vellum_ai/types/generate_stream_result_data.rb
320
321
  - lib/vellum_ai/types/google_vertex_ai_vectorizer_config.rb
321
322
  - lib/vellum_ai/types/google_vertex_ai_vectorizer_config_request.rb
323
+ - lib/vellum_ai/types/google_vertex_ai_vectorizer_gemini_embedding_001.rb
324
+ - lib/vellum_ai/types/google_vertex_ai_vectorizer_gemini_embedding_001_request.rb
322
325
  - lib/vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004.rb
323
326
  - lib/vellum_ai/types/google_vertex_ai_vectorizer_text_embedding_004_request.rb
324
327
  - lib/vellum_ai/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002.rb
@@ -637,6 +640,8 @@ files:
637
640
  - lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result.rb
638
641
  - lib/vellum_ai/types/test_suite_test_case_replaced_bulk_result_data.rb
639
642
  - lib/vellum_ai/types/test_suite_test_case_upsert_bulk_operation_request.rb
643
+ - lib/vellum_ai/types/thinking_vellum_value.rb
644
+ - lib/vellum_ai/types/thinking_vellum_value_request.rb
640
645
  - lib/vellum_ai/types/token_overlapping_window_chunker_config.rb
641
646
  - lib/vellum_ai/types/token_overlapping_window_chunker_config_request.rb
642
647
  - lib/vellum_ai/types/token_overlapping_window_chunking.rb