vellum_ai 0.14.74 → 0.14.75

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: 4225c8cf5ef8d42ba4162b9383eff9d3ebeab88f4ee2638bc9073c593b595932
4
- data.tar.gz: 522706a8074fc0c410d5e5f8bbb1fb4e291867f001f3b2401ba5ca9710d9dd2e
3
+ metadata.gz: 6fadc8b03117073d204270b76378cbf2ca4dff1618d1857bf409252ba16fd755
4
+ data.tar.gz: bdd9f9a86fdbf94115755c125293e466b527b5c1a07c440d95047e02c90929f3
5
5
  SHA512:
6
- metadata.gz: 1c53c230b0c262ca9bb729298623188cb7609e300f72ce0a11fb29d9bb98384dff664f21d0ad94bbb483fd9d15143d2ef5dfdedd635f5040a27931b6bda2b61c
7
- data.tar.gz: f0b8ee384ec5b0ef6ff8f375cd67e6f9b835e6bddfa4bb84f7a9fbbb36a5d3194f2a593642e241fb9a6b177126daefca78632db50599615c0f1b097cc88fad65
6
+ metadata.gz: 6c9651cdc76ba6dee7c1573ee5c04b7c10155a80a046d6fac4a37f2eb977131ed78cbbfc2df39612fd8f9c0eebd9d6145b81d41b2c928de19e1ab8e9c06ec5f8
7
+ data.tar.gz: 1a491e5b98f2dcff34f3973a64fb9a2b7f52f1e66f95e2aada7eed0933ece711ccb2f4eb0d5100e8d0be9a3f0081a03ee2180eda807b43f8bd3b318de6f4508d
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.74' }
53
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.75' }
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.74' }
99
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '0.14.75' }
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
@@ -50,6 +50,10 @@ end
50
50
  end
51
51
  # Used to push updates to a Prompt in Vellum.
52
52
  #
53
+ # @param prompt_variant_id [String] If specified, an existing Prompt Variant by the provided ID will be updated.
54
+ # Otherwise, a new Prompt Variant will be created and an ID generated.
55
+ # @param prompt_variant_label [String] If provided, then the created/updated Prompt Variant will have this label.
56
+ # @param prompt_sandbox_id [String]
53
57
  # @param exec_config [Hash] Request of type Vellum::PromptExecConfig, as a Hash
54
58
  # * :ml_model (String)
55
59
  # * :input_variables (Array<Vellum::VellumVariable>)
@@ -68,8 +72,6 @@ end
68
72
  # * :stream_enabled (Boolean)
69
73
  # * :blocks (Array<Vellum::PromptBlock>)
70
74
  # * :functions (Array<Vellum::FunctionDefinition>)
71
- # @param prompt_variant_id [String]
72
- # @param prompt_sandbox_id [String]
73
75
  # @param request_options [Vellum::RequestOptions]
74
76
  # @return [Vellum::PromptPushResponse]
75
77
  # @example
@@ -79,7 +81,7 @@ end
79
81
  # api_key: "YOUR_API_KEY"
80
82
  # )
81
83
  # api.prompts.push(exec_config: { ml_model: "ml_model", input_variables: [{ id: "id", key: "key", type: STRING }], parameters: { }, blocks: [{ block_type: "JINJA", template: "template" }] })
82
- def push(exec_config:, prompt_variant_id: nil, prompt_sandbox_id: nil, request_options: nil)
84
+ def push(prompt_variant_id: nil, prompt_variant_label: nil, prompt_sandbox_id: nil, exec_config:, request_options: nil)
83
85
  response = @request_client.conn.post do | req |
84
86
  unless request_options&.timeout_in_seconds.nil?
85
87
  req.options.timeout = request_options.timeout_in_seconds
@@ -91,7 +93,7 @@ end
91
93
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
92
94
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
93
95
  end
94
- req.body = { **(request_options&.additional_body_parameters || {}), exec_config: exec_config, prompt_variant_id: prompt_variant_id, prompt_sandbox_id: prompt_sandbox_id }.compact
96
+ req.body = { **(request_options&.additional_body_parameters || {}), prompt_variant_id: prompt_variant_id, prompt_variant_label: prompt_variant_label, prompt_sandbox_id: prompt_sandbox_id, exec_config: exec_config }.compact
95
97
  req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/prompts/push"
96
98
  end
97
99
  Vellum::PromptPushResponse.from_json(json_object: response.body)
@@ -142,6 +144,10 @@ end
142
144
  end
143
145
  # Used to push updates to a Prompt in Vellum.
144
146
  #
147
+ # @param prompt_variant_id [String] If specified, an existing Prompt Variant by the provided ID will be updated.
148
+ # Otherwise, a new Prompt Variant will be created and an ID generated.
149
+ # @param prompt_variant_label [String] If provided, then the created/updated Prompt Variant will have this label.
150
+ # @param prompt_sandbox_id [String]
145
151
  # @param exec_config [Hash] Request of type Vellum::PromptExecConfig, as a Hash
146
152
  # * :ml_model (String)
147
153
  # * :input_variables (Array<Vellum::VellumVariable>)
@@ -160,8 +166,6 @@ end
160
166
  # * :stream_enabled (Boolean)
161
167
  # * :blocks (Array<Vellum::PromptBlock>)
162
168
  # * :functions (Array<Vellum::FunctionDefinition>)
163
- # @param prompt_variant_id [String]
164
- # @param prompt_sandbox_id [String]
165
169
  # @param request_options [Vellum::RequestOptions]
166
170
  # @return [Vellum::PromptPushResponse]
167
171
  # @example
@@ -171,7 +175,7 @@ end
171
175
  # api_key: "YOUR_API_KEY"
172
176
  # )
173
177
  # api.prompts.push(exec_config: { ml_model: "ml_model", input_variables: [{ id: "id", key: "key", type: STRING }], parameters: { }, blocks: [{ block_type: "JINJA", template: "template" }] })
174
- def push(exec_config:, prompt_variant_id: nil, prompt_sandbox_id: nil, request_options: nil)
178
+ def push(prompt_variant_id: nil, prompt_variant_label: nil, prompt_sandbox_id: nil, exec_config:, request_options: nil)
175
179
  Async do
176
180
  response = @request_client.conn.post do | req |
177
181
  unless request_options&.timeout_in_seconds.nil?
@@ -184,7 +188,7 @@ end
184
188
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
185
189
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
186
190
  end
187
- req.body = { **(request_options&.additional_body_parameters || {}), exec_config: exec_config, prompt_variant_id: prompt_variant_id, prompt_sandbox_id: prompt_sandbox_id }.compact
191
+ req.body = { **(request_options&.additional_body_parameters || {}), prompt_variant_id: prompt_variant_id, prompt_variant_label: prompt_variant_label, prompt_sandbox_id: prompt_sandbox_id, exec_config: exec_config }.compact
188
192
  req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/prompts/push"
189
193
  end
190
194
  Vellum::PromptPushResponse.from_json(json_object: response.body)
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.74
4
+ version: 0.14.75
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-24 00:00:00.000000000 Z
11
+ date: 2025-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday