vellum_ai 1.3.3 → 1.3.4

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: c89bc8d37213b301ac14a66e24d44df3d041c79d01ed00bbd137c28cf7d389fe
4
- data.tar.gz: cf6d35d419139341e0a4ab93c2c8906a834eea5533727fa9c806f8d08278775e
3
+ metadata.gz: 67cf25f86c813fa599f69c946e91a2939fb4cfa1735b5f6f7e9e0438cef415ad
4
+ data.tar.gz: 7181ba7a41b2ce6132fa32faa221b2dc2d4f3c424ed9c6aa5da4bf7153f7cd87
5
5
  SHA512:
6
- metadata.gz: d33c9db1f5584045ee3eb4cba2c811d3188001e9a1445eb5d2473c9a01cf5ff000519c8fb299fdfea908cad6fd61d5838bf1e32d6d5a614ee1bb6bf6593145a0
7
- data.tar.gz: b7f0937f2ef0c8fbba53bc6bbe71f2acaa395a8785d4934cdd47885ca1d128f704929dc9021f93949edbf80a30f6404c2dbe7a7504501a4bda291ee6a525400c
6
+ metadata.gz: c2bf76365f918b3f267cbcf7f95ff8b7e1c33e7f2f30067466a9eb088a303b1523c8bca11b95285e4a8c06c25a3e220e6af7aa12044d83262b15b5648d19e624
7
+ data.tar.gz: 05c759acf4719564faf315d4fdc73f85711d0f949990dac54df5dd99dd384e6b0bd74f924a2ebdb5651411e44a1e19b523802cf27e3ef582e3b2a19a068c5471
data/lib/requests.rb CHANGED
@@ -56,7 +56,7 @@ end
56
56
  end
57
57
  # @return [Hash{String => String}]
58
58
  def get_headers
59
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.3.3' }
59
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.3.4' }
60
60
  headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
61
61
  headers
62
62
  end
@@ -107,7 +107,7 @@ end
107
107
  end
108
108
  # @return [Hash{String => String}]
109
109
  def get_headers
110
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.3.3' }
110
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.3.4' }
111
111
  headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
112
112
  headers
113
113
  end
@@ -53,6 +53,7 @@ module Vellum
53
53
  # * :name (String)
54
54
  # * :description (String)
55
55
  # * :parameters (Hash{String => Object})
56
+ # * :inputs (Hash{String => Object})
56
57
  # * :forced (Boolean)
57
58
  # * :strict (Boolean)
58
59
  # @param expand_meta [Hash] Request of type Vellum::AdHocExpandMeta, as a Hash
@@ -139,6 +140,7 @@ end
139
140
  # * :name (String)
140
141
  # * :description (String)
141
142
  # * :parameters (Hash{String => Object})
143
+ # * :inputs (Hash{String => Object})
142
144
  # * :forced (Boolean)
143
145
  # * :strict (Boolean)
144
146
  # @param expand_meta [Hash] Request of type Vellum::AdHocExpandMeta, as a Hash
@@ -18,6 +18,8 @@ module Vellum
18
18
  attr_reader :description
19
19
  # @return [Hash{String => Object}] An OpenAPI specification of parameters that are supported by this function.
20
20
  attr_reader :parameters
21
+ # @return [Hash{String => Object}] Optional user defined input mappings for this function.
22
+ attr_reader :inputs
21
23
  # @return [Boolean] Set this option to true to force the model to return a function call of this
22
24
  # function.
23
25
  attr_reader :forced
@@ -36,21 +38,23 @@ module Vellum
36
38
  # @param name [String] The name identifying the function.
37
39
  # @param description [String] A description to help guide the model when to invoke this function.
38
40
  # @param parameters [Hash{String => Object}] An OpenAPI specification of parameters that are supported by this function.
41
+ # @param inputs [Hash{String => Object}] Optional user defined input mappings for this function.
39
42
  # @param forced [Boolean] Set this option to true to force the model to return a function call of this
40
43
  # function.
41
44
  # @param strict [Boolean] Set this option to use strict schema decoding when available.
42
45
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
43
46
  # @return [Vellum::FunctionDefinition]
44
- def initialize(state: OMIT, cache_config: OMIT, name: OMIT, description: OMIT, parameters: OMIT, forced: OMIT, strict: OMIT, additional_properties: nil)
47
+ def initialize(state: OMIT, cache_config: OMIT, name: OMIT, description: OMIT, parameters: OMIT, inputs: OMIT, forced: OMIT, strict: OMIT, additional_properties: nil)
45
48
  @state = state if state != OMIT
46
49
  @cache_config = cache_config if cache_config != OMIT
47
50
  @name = name if name != OMIT
48
51
  @description = description if description != OMIT
49
52
  @parameters = parameters if parameters != OMIT
53
+ @inputs = inputs if inputs != OMIT
50
54
  @forced = forced if forced != OMIT
51
55
  @strict = strict if strict != OMIT
52
56
  @additional_properties = additional_properties
53
- @_field_set = { "state": state, "cache_config": cache_config, "name": name, "description": description, "parameters": parameters, "forced": forced, "strict": strict }.reject do | _k, v |
57
+ @_field_set = { "state": state, "cache_config": cache_config, "name": name, "description": description, "parameters": parameters, "inputs": inputs, "forced": forced, "strict": strict }.reject do | _k, v |
54
58
  v == OMIT
55
59
  end
56
60
  end
@@ -71,6 +75,7 @@ end
71
75
  name = parsed_json["name"]
72
76
  description = parsed_json["description"]
73
77
  parameters = parsed_json["parameters"]
78
+ inputs = parsed_json["inputs"]
74
79
  forced = parsed_json["forced"]
75
80
  strict = parsed_json["strict"]
76
81
  new(
@@ -79,6 +84,7 @@ end
79
84
  name: name,
80
85
  description: description,
81
86
  parameters: parameters,
87
+ inputs: inputs,
82
88
  forced: forced,
83
89
  strict: strict,
84
90
  additional_properties: struct
@@ -102,6 +108,7 @@ end
102
108
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
103
109
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
104
110
  obj.parameters&.is_a?(Hash) != false || raise("Passed value for field obj.parameters is not the expected type, validation failed.")
111
+ obj.inputs&.is_a?(Hash) != false || raise("Passed value for field obj.inputs is not the expected type, validation failed.")
105
112
  obj.forced&.is_a?(Boolean) != false || raise("Passed value for field obj.forced is not the expected type, validation failed.")
106
113
  obj.strict&.is_a?(Boolean) != false || raise("Passed value for field obj.strict is not the expected type, validation failed.")
107
114
  end
@@ -24,12 +24,14 @@ module Vellum
24
24
  # @param input_variable_id [String]
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
26
  # @return [Vellum::ScenarioInputAudioVariableValue]
27
- def initialize(type:, value:, input_variable_id:, additional_properties: nil)
27
+ def initialize(type:, value: OMIT, input_variable_id:, additional_properties: nil)
28
28
  @type = type
29
- @value = value
29
+ @value = value if value != OMIT
30
30
  @input_variable_id = input_variable_id
31
31
  @additional_properties = additional_properties
32
- @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }
32
+ @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }.reject do | _k, v |
33
+ v == OMIT
34
+ end
33
35
  end
34
36
  # Deserialize a JSON object to an instance of ScenarioInputAudioVariableValue
35
37
  #
@@ -67,7 +69,7 @@ module Vellum
67
69
  # @return [Void]
68
70
  def self.validate_raw(obj:)
69
71
  obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
70
- Vellum::VellumAudio.validate_raw(obj: obj.value)
72
+ obj.value.nil? || Vellum::VellumAudio.validate_raw(obj: obj.value)
71
73
  obj.input_variable_id.is_a?(String) != false || raise("Passed value for field obj.input_variable_id is not the expected type, validation failed.")
72
74
  end
73
75
  end
@@ -24,12 +24,14 @@ module Vellum
24
24
  # @param input_variable_id [String]
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
26
  # @return [Vellum::ScenarioInputDocumentVariableValue]
27
- def initialize(type:, value:, input_variable_id:, additional_properties: nil)
27
+ def initialize(type:, value: OMIT, input_variable_id:, additional_properties: nil)
28
28
  @type = type
29
- @value = value
29
+ @value = value if value != OMIT
30
30
  @input_variable_id = input_variable_id
31
31
  @additional_properties = additional_properties
32
- @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }
32
+ @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }.reject do | _k, v |
33
+ v == OMIT
34
+ end
33
35
  end
34
36
  # Deserialize a JSON object to an instance of ScenarioInputDocumentVariableValue
35
37
  #
@@ -67,7 +69,7 @@ module Vellum
67
69
  # @return [Void]
68
70
  def self.validate_raw(obj:)
69
71
  obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
70
- Vellum::VellumDocument.validate_raw(obj: obj.value)
72
+ obj.value.nil? || Vellum::VellumDocument.validate_raw(obj: obj.value)
71
73
  obj.input_variable_id.is_a?(String) != false || raise("Passed value for field obj.input_variable_id is not the expected type, validation failed.")
72
74
  end
73
75
  end
@@ -24,12 +24,14 @@ module Vellum
24
24
  # @param input_variable_id [String]
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
26
  # @return [Vellum::ScenarioInputImageVariableValue]
27
- def initialize(type:, value:, input_variable_id:, additional_properties: nil)
27
+ def initialize(type:, value: OMIT, input_variable_id:, additional_properties: nil)
28
28
  @type = type
29
- @value = value
29
+ @value = value if value != OMIT
30
30
  @input_variable_id = input_variable_id
31
31
  @additional_properties = additional_properties
32
- @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }
32
+ @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }.reject do | _k, v |
33
+ v == OMIT
34
+ end
33
35
  end
34
36
  # Deserialize a JSON object to an instance of ScenarioInputImageVariableValue
35
37
  #
@@ -67,7 +69,7 @@ module Vellum
67
69
  # @return [Void]
68
70
  def self.validate_raw(obj:)
69
71
  obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
70
- Vellum::VellumImage.validate_raw(obj: obj.value)
72
+ obj.value.nil? || Vellum::VellumImage.validate_raw(obj: obj.value)
71
73
  obj.input_variable_id.is_a?(String) != false || raise("Passed value for field obj.input_variable_id is not the expected type, validation failed.")
72
74
  end
73
75
  end
@@ -24,12 +24,14 @@ module Vellum
24
24
  # @param input_variable_id [String]
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
26
  # @return [Vellum::ScenarioInputVideoVariableValue]
27
- def initialize(type:, value:, input_variable_id:, additional_properties: nil)
27
+ def initialize(type:, value: OMIT, input_variable_id:, additional_properties: nil)
28
28
  @type = type
29
- @value = value
29
+ @value = value if value != OMIT
30
30
  @input_variable_id = input_variable_id
31
31
  @additional_properties = additional_properties
32
- @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }
32
+ @_field_set = { "type": type, "value": value, "input_variable_id": input_variable_id }.reject do | _k, v |
33
+ v == OMIT
34
+ end
33
35
  end
34
36
  # Deserialize a JSON object to an instance of ScenarioInputVideoVariableValue
35
37
  #
@@ -67,7 +69,7 @@ module Vellum
67
69
  # @return [Void]
68
70
  def self.validate_raw(obj:)
69
71
  obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
70
- Vellum::VellumVideo.validate_raw(obj: obj.value)
72
+ obj.value.nil? || Vellum::VellumVideo.validate_raw(obj: obj.value)
71
73
  obj.input_variable_id.is_a?(String) != false || raise("Passed value for field obj.input_variable_id is not the expected type, validation failed.")
72
74
  end
73
75
  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: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vellum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-02 00:00:00.000000000 Z
11
+ date: 2025-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday