vellum_ai 1.12.12 → 1.13.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81be6b1e6325747fbdee0c02ba4c78c1e22e12a4fe3510412cbb4bdc752c0bf5
|
|
4
|
+
data.tar.gz: ee5ec6394345c71d2fba7498700b95009101203d2832a24321387ac1e53bb82b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e92bebb6791423a9dc6e9d9ed34b4f9145965874bd84fa24ad47a62e20b09004a4cf0913b05c67e898f7747751f8a64a85764e9c1ac4849ce132ed9b861afa91
|
|
7
|
+
data.tar.gz: 7edec2c1052f5782266237a50c03d9092418795322150b01ec13619776fb5a129145c2209e3364083df8f60a90037f77a7c1e197f3d248c39816261bd8cc4e23
|
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.
|
|
59
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.1' }
|
|
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.
|
|
110
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.1' }
|
|
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
|
data/lib/types_export.rb
CHANGED
|
@@ -715,6 +715,7 @@ require_relative "vellum_ai/types/workflow_result_event_output_data"
|
|
|
715
715
|
require_relative "vellum_ai/types/workflow_result_event_state"
|
|
716
716
|
require_relative "vellum_ai/types/workflow_sandbox_display_data"
|
|
717
717
|
require_relative "vellum_ai/types/workflow_sandbox_example"
|
|
718
|
+
require_relative "vellum_ai/types/workflow_sandbox_execute_node_response"
|
|
718
719
|
require_relative "vellum_ai/types/workflow_stream_event"
|
|
719
720
|
require_relative "vellum_ai/types/workspace_display_config"
|
|
720
721
|
require_relative "vellum_ai/types/workspace_read"
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Vellum
|
|
4
|
-
# * `
|
|
4
|
+
# * `ANONYMOUS` - ANONYMOUS
|
|
5
|
+
# * `WORKSPACE_API_KEY` - WORKSPACE_API_KEY
|
|
5
6
|
# * `ENVIRONMENT_API_KEY` - ENVIRONMENT_API_KEY
|
|
6
7
|
# * `JWT` - JWT
|
|
7
8
|
# * `SERVICE_TOKEN` - SERVICE_TOKEN
|
|
8
9
|
class ApiActorTypeEnum
|
|
9
10
|
|
|
11
|
+
ANONYMOUS = "ANONYMOUS"
|
|
10
12
|
WORKSPACE_API_KEY = "WORKSPACE_API_KEY"
|
|
11
13
|
ENVIRONMENT_API_KEY = "ENVIRONMENT_API_KEY"
|
|
12
14
|
JWT = "JWT"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require "json"
|
|
3
|
+
require_relative "node_execution_fulfilled_event"
|
|
4
|
+
require_relative "node_execution_rejected_event"
|
|
5
|
+
|
|
6
|
+
module Vellum
|
|
7
|
+
class WorkflowSandboxExecuteNodeResponse
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# Deserialize a JSON object to an instance of WorkflowSandboxExecuteNodeResponse
|
|
11
|
+
#
|
|
12
|
+
# @param json_object [String]
|
|
13
|
+
# @return [Vellum::WorkflowSandboxExecuteNodeResponse]
|
|
14
|
+
def self.from_json(json_object:)
|
|
15
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
16
|
+
begin
|
|
17
|
+
Vellum::NodeExecutionFulfilledEvent.validate_raw(obj: struct)
|
|
18
|
+
unless struct.nil?
|
|
19
|
+
return Vellum::NodeExecutionFulfilledEvent.from_json(json_object: struct)
|
|
20
|
+
else
|
|
21
|
+
return nil
|
|
22
|
+
end
|
|
23
|
+
rescue StandardError
|
|
24
|
+
# noop
|
|
25
|
+
end
|
|
26
|
+
begin
|
|
27
|
+
Vellum::NodeExecutionRejectedEvent.validate_raw(obj: struct)
|
|
28
|
+
unless struct.nil?
|
|
29
|
+
return Vellum::NodeExecutionRejectedEvent.from_json(json_object: struct)
|
|
30
|
+
else
|
|
31
|
+
return nil
|
|
32
|
+
end
|
|
33
|
+
rescue StandardError
|
|
34
|
+
# noop
|
|
35
|
+
end
|
|
36
|
+
return struct
|
|
37
|
+
end
|
|
38
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
39
|
+
# hash and check each fields type against the current object's property
|
|
40
|
+
# definitions.
|
|
41
|
+
#
|
|
42
|
+
# @param obj [Object]
|
|
43
|
+
# @return [Void]
|
|
44
|
+
def self.validate_raw(obj:)
|
|
45
|
+
begin
|
|
46
|
+
return Vellum::NodeExecutionFulfilledEvent.validate_raw(obj: obj)
|
|
47
|
+
rescue StandardError
|
|
48
|
+
# noop
|
|
49
|
+
end
|
|
50
|
+
begin
|
|
51
|
+
return Vellum::NodeExecutionRejectedEvent.validate_raw(obj: obj)
|
|
52
|
+
rescue StandardError
|
|
53
|
+
# noop
|
|
54
|
+
end
|
|
55
|
+
raise("Passed value matched no type within the union, validation failed.")
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
require_relative "../../requests"
|
|
3
3
|
require_relative "../types/workflow_resolved_state"
|
|
4
|
+
require_relative "../types/workflow_sandbox_execute_node_response"
|
|
4
5
|
require_relative "../types/check_workflow_execution_status_response"
|
|
5
6
|
require_relative "../types/workflow_push_deployment_config_request"
|
|
6
7
|
require_relative "../types/dataset_row_push_request"
|
|
@@ -13,6 +14,7 @@ require "async"
|
|
|
13
14
|
require "async"
|
|
14
15
|
require "async"
|
|
15
16
|
require "async"
|
|
17
|
+
require "async"
|
|
16
18
|
require_relative "../../requests"
|
|
17
19
|
|
|
18
20
|
module Vellum
|
|
@@ -100,6 +102,40 @@ end
|
|
|
100
102
|
end
|
|
101
103
|
Vellum::WorkflowResolvedState.from_json(json_object: response.body)
|
|
102
104
|
end
|
|
105
|
+
# @param files [Hash{String => String}]
|
|
106
|
+
# @param node [String]
|
|
107
|
+
# @param inputs [Hash{String => Object}]
|
|
108
|
+
# @param request_options [Vellum::RequestOptions]
|
|
109
|
+
# @return [Vellum::NodeExecutionFulfilledEvent, Vellum::NodeExecutionRejectedEvent]
|
|
110
|
+
# @example
|
|
111
|
+
# api = Vellum::Client.new(
|
|
112
|
+
# base_url: "https://api.example.com",
|
|
113
|
+
# environment: Vellum::Environment::PRODUCTION,
|
|
114
|
+
# api_key: "YOUR_API_KEY"
|
|
115
|
+
# )
|
|
116
|
+
# api.workflows.execute_node(files: { "files": "files" }, node: "x")
|
|
117
|
+
def execute_node(files:, node:, inputs: nil, request_options: nil)
|
|
118
|
+
response = @request_client.conn.post do | req |
|
|
119
|
+
unless request_options&.timeout_in_seconds.nil?
|
|
120
|
+
req.options.timeout = request_options.timeout_in_seconds
|
|
121
|
+
end
|
|
122
|
+
unless request_options&.api_key.nil?
|
|
123
|
+
req.headers["X-API-KEY"] = request_options.api_key
|
|
124
|
+
end
|
|
125
|
+
unless request_options&.api_version.nil?
|
|
126
|
+
req.headers["X-API-Version"] = request_options.api_version
|
|
127
|
+
else
|
|
128
|
+
req.headers["X-API-Version"] = "2025-07-30"
|
|
129
|
+
end
|
|
130
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
|
131
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
|
132
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
|
133
|
+
end
|
|
134
|
+
req.body = { **(request_options&.additional_body_parameters || {}), files: files, node: node, inputs: inputs }.compact
|
|
135
|
+
req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/execute-node"
|
|
136
|
+
end
|
|
137
|
+
Vellum::WorkflowSandboxExecuteNodeResponse.from_json(json_object: response.body)
|
|
138
|
+
end
|
|
103
139
|
# Checks if a workflow execution is currently executing (not fulfilled, not
|
|
104
140
|
# rejected, and has no end time).
|
|
105
141
|
# Uses the ClickHouse Prime summary materialized view.
|
|
@@ -314,6 +350,42 @@ end
|
|
|
314
350
|
Vellum::WorkflowResolvedState.from_json(json_object: response.body)
|
|
315
351
|
end
|
|
316
352
|
end
|
|
353
|
+
# @param files [Hash{String => String}]
|
|
354
|
+
# @param node [String]
|
|
355
|
+
# @param inputs [Hash{String => Object}]
|
|
356
|
+
# @param request_options [Vellum::RequestOptions]
|
|
357
|
+
# @return [Vellum::NodeExecutionFulfilledEvent, Vellum::NodeExecutionRejectedEvent]
|
|
358
|
+
# @example
|
|
359
|
+
# api = Vellum::Client.new(
|
|
360
|
+
# base_url: "https://api.example.com",
|
|
361
|
+
# environment: Vellum::Environment::PRODUCTION,
|
|
362
|
+
# api_key: "YOUR_API_KEY"
|
|
363
|
+
# )
|
|
364
|
+
# api.workflows.execute_node(files: { "files": "files" }, node: "x")
|
|
365
|
+
def execute_node(files:, node:, inputs: nil, request_options: nil)
|
|
366
|
+
Async do
|
|
367
|
+
response = @request_client.conn.post do | req |
|
|
368
|
+
unless request_options&.timeout_in_seconds.nil?
|
|
369
|
+
req.options.timeout = request_options.timeout_in_seconds
|
|
370
|
+
end
|
|
371
|
+
unless request_options&.api_key.nil?
|
|
372
|
+
req.headers["X-API-KEY"] = request_options.api_key
|
|
373
|
+
end
|
|
374
|
+
unless request_options&.api_version.nil?
|
|
375
|
+
req.headers["X-API-Version"] = request_options.api_version
|
|
376
|
+
else
|
|
377
|
+
req.headers["X-API-Version"] = "2025-07-30"
|
|
378
|
+
end
|
|
379
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
|
380
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
|
381
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
|
382
|
+
end
|
|
383
|
+
req.body = { **(request_options&.additional_body_parameters || {}), files: files, node: node, inputs: inputs }.compact
|
|
384
|
+
req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/execute-node"
|
|
385
|
+
end
|
|
386
|
+
Vellum::WorkflowSandboxExecuteNodeResponse.from_json(json_object: response.body)
|
|
387
|
+
end
|
|
388
|
+
end
|
|
317
389
|
# Checks if a workflow execution is currently executing (not fulfilled, not
|
|
318
390
|
# rejected, and has no end time).
|
|
319
391
|
# Uses the ClickHouse Prime summary materialized view.
|
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.
|
|
4
|
+
version: 1.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vellum
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -867,6 +867,7 @@ files:
|
|
|
867
867
|
- lib/vellum_ai/types/workflow_result_event_state.rb
|
|
868
868
|
- lib/vellum_ai/types/workflow_sandbox_display_data.rb
|
|
869
869
|
- lib/vellum_ai/types/workflow_sandbox_example.rb
|
|
870
|
+
- lib/vellum_ai/types/workflow_sandbox_execute_node_response.rb
|
|
870
871
|
- lib/vellum_ai/types/workflow_sandbox_parent_context.rb
|
|
871
872
|
- lib/vellum_ai/types/workflow_stream_event.rb
|
|
872
873
|
- lib/vellum_ai/types/workspace_display_config.rb
|