vellum_ai 1.2.5 → 1.3.0
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 +4 -4
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +4 -0
- data/lib/vellum_ai/types/deployment_read.rb +3 -8
- data/lib/vellum_ai/types/environment_enum.rb +0 -3
- data/lib/vellum_ai/types/slim_deployment_read.rb +3 -8
- data/lib/vellum_ai/types/slim_workflow_deployment.rb +3 -8
- data/lib/vellum_ai/types/workflow_deployment_read.rb +3 -8
- data/lib/vellum_ai/types/workflow_request_audio_input_request.rb +75 -0
- data/lib/vellum_ai/types/workflow_request_document_input_request.rb +75 -0
- data/lib/vellum_ai/types/workflow_request_image_input_request.rb +75 -0
- data/lib/vellum_ai/types/workflow_request_input_request.rb +64 -0
- data/lib/vellum_ai/types/workflow_request_video_input_request.rb +75 -0
- data/lib/vellum_ai/workflow_sandboxes/client.rb +6 -8
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99d9142f677a2b7a678dcf8e13f2088fd21fa4aee05bd913831f0d160230ac14
|
4
|
+
data.tar.gz: 1b3eeb8be6f9ad661d6c55eab0202d76c178719c956647123fe3ba5238a6b79d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ad35f1c36ab43a4c67e5f1a3b3944dbe8be67e5ce56d75b7f2f35628c3f9c5466719a48a4e69b96dc40013d87f18affcf461d10cbe237f4c1a4d5c97a770c83
|
7
|
+
data.tar.gz: 811d12235957dc8c1dd8fbf20940ca0a961738f92c7b85d03df8a1696a557b20cc010a4976d523613fdf0dcd21cf744c0d3db5f77740206439b0daa08ab2207e
|
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.3.0' }
|
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.3.0' }
|
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
@@ -642,10 +642,14 @@ require_relative "vellum_ai/types/workflow_push_deployment_config_request"
|
|
642
642
|
require_relative "vellum_ai/types/workflow_push_response"
|
643
643
|
require_relative "vellum_ai/types/workflow_release_tag_read"
|
644
644
|
require_relative "vellum_ai/types/workflow_release_tag_workflow_deployment_history_item"
|
645
|
+
require_relative "vellum_ai/types/workflow_request_audio_input_request"
|
645
646
|
require_relative "vellum_ai/types/workflow_request_chat_history_input_request"
|
647
|
+
require_relative "vellum_ai/types/workflow_request_document_input_request"
|
648
|
+
require_relative "vellum_ai/types/workflow_request_image_input_request"
|
646
649
|
require_relative "vellum_ai/types/workflow_request_string_input_request"
|
647
650
|
require_relative "vellum_ai/types/workflow_request_json_input_request"
|
648
651
|
require_relative "vellum_ai/types/workflow_request_number_input_request"
|
652
|
+
require_relative "vellum_ai/types/workflow_request_video_input_request"
|
649
653
|
require_relative "vellum_ai/types/workflow_request_input_request"
|
650
654
|
require_relative "vellum_ai/types/workflow_result_event"
|
651
655
|
require_relative "vellum_ai/types/workflow_result_event_output_data_string"
|
@@ -8,6 +8,7 @@ require "ostruct"
|
|
8
8
|
require "json"
|
9
9
|
|
10
10
|
module Vellum
|
11
|
+
# A Prompt Deployment's full details.
|
11
12
|
class DeploymentRead
|
12
13
|
# @return [String]
|
13
14
|
attr_reader :id
|
@@ -21,10 +22,7 @@ module Vellum
|
|
21
22
|
# * `ACTIVE` - Active
|
22
23
|
# * `ARCHIVED` - Archived
|
23
24
|
attr_reader :status
|
24
|
-
# @return [Vellum::EnvironmentEnum] The
|
25
|
-
# * `DEVELOPMENT` - Development
|
26
|
-
# * `STAGING` - Staging
|
27
|
-
# * `PRODUCTION` - Production
|
25
|
+
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
28
26
|
attr_reader :environment
|
29
27
|
# @return [DateTime]
|
30
28
|
attr_reader :last_deployed_on
|
@@ -51,10 +49,7 @@ module Vellum
|
|
51
49
|
# @param status [Vellum::EntityStatus] The current status of the deployment
|
52
50
|
# * `ACTIVE` - Active
|
53
51
|
# * `ARCHIVED` - Archived
|
54
|
-
# @param environment [Vellum::EnvironmentEnum] The
|
55
|
-
# * `DEVELOPMENT` - Development
|
56
|
-
# * `STAGING` - Staging
|
57
|
-
# * `PRODUCTION` - Production
|
52
|
+
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
58
53
|
# @param last_deployed_on [DateTime]
|
59
54
|
# @param input_variables [Array<Vellum::VellumVariable>]
|
60
55
|
# @param description [String] A human-readable description of the deployment
|
@@ -8,6 +8,7 @@ require "ostruct"
|
|
8
8
|
require "json"
|
9
9
|
|
10
10
|
module Vellum
|
11
|
+
# A subset of a Prompt Deployment's full details.
|
11
12
|
class SlimDeploymentRead
|
12
13
|
# @return [String]
|
13
14
|
attr_reader :id
|
@@ -21,10 +22,7 @@ module Vellum
|
|
21
22
|
# * `ACTIVE` - Active
|
22
23
|
# * `ARCHIVED` - Archived
|
23
24
|
attr_reader :status
|
24
|
-
# @return [Vellum::EnvironmentEnum] The
|
25
|
-
# * `DEVELOPMENT` - Development
|
26
|
-
# * `STAGING` - Staging
|
27
|
-
# * `PRODUCTION` - Production
|
25
|
+
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
28
26
|
attr_reader :environment
|
29
27
|
# @return [DateTime]
|
30
28
|
attr_reader :last_deployed_on
|
@@ -47,10 +45,7 @@ module Vellum
|
|
47
45
|
# @param status [Vellum::EntityStatus] The current status of the deployment
|
48
46
|
# * `ACTIVE` - Active
|
49
47
|
# * `ARCHIVED` - Archived
|
50
|
-
# @param environment [Vellum::EnvironmentEnum] The
|
51
|
-
# * `DEVELOPMENT` - Development
|
52
|
-
# * `STAGING` - Staging
|
53
|
-
# * `PRODUCTION` - Production
|
48
|
+
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
54
49
|
# @param last_deployed_on [DateTime]
|
55
50
|
# @param input_variables [Array<Vellum::VellumVariable>]
|
56
51
|
# @param description [String] A human-readable description of the deployment
|
@@ -8,6 +8,7 @@ require "ostruct"
|
|
8
8
|
require "json"
|
9
9
|
|
10
10
|
module Vellum
|
11
|
+
# A subset of a Workflow Deployment's full details.
|
11
12
|
class SlimWorkflowDeployment
|
12
13
|
# @return [String]
|
13
14
|
attr_reader :id
|
@@ -19,10 +20,7 @@ module Vellum
|
|
19
20
|
# * `ACTIVE` - Active
|
20
21
|
# * `ARCHIVED` - Archived
|
21
22
|
attr_reader :status
|
22
|
-
# @return [Vellum::EnvironmentEnum] The
|
23
|
-
# * `DEVELOPMENT` - Development
|
24
|
-
# * `STAGING` - Staging
|
25
|
-
# * `PRODUCTION` - Production
|
23
|
+
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
26
24
|
attr_reader :environment
|
27
25
|
# @return [DateTime]
|
28
26
|
attr_reader :created
|
@@ -49,10 +47,7 @@ module Vellum
|
|
49
47
|
# @param status [Vellum::EntityStatus] The current status of the workflow deployment
|
50
48
|
# * `ACTIVE` - Active
|
51
49
|
# * `ARCHIVED` - Archived
|
52
|
-
# @param environment [Vellum::EnvironmentEnum] The
|
53
|
-
# * `DEVELOPMENT` - Development
|
54
|
-
# * `STAGING` - Staging
|
55
|
-
# * `PRODUCTION` - Production
|
50
|
+
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
56
51
|
# @param created [DateTime]
|
57
52
|
# @param last_deployed_on [DateTime]
|
58
53
|
# @param input_variables [Array<Vellum::VellumVariable>] The input variables this Workflow Deployment expects to receive values for when
|
@@ -8,6 +8,7 @@ require "ostruct"
|
|
8
8
|
require "json"
|
9
9
|
|
10
10
|
module Vellum
|
11
|
+
# A Workflow Deployment's full details.
|
11
12
|
class WorkflowDeploymentRead
|
12
13
|
# @return [String]
|
13
14
|
attr_reader :id
|
@@ -19,10 +20,7 @@ module Vellum
|
|
19
20
|
# * `ACTIVE` - Active
|
20
21
|
# * `ARCHIVED` - Archived
|
21
22
|
attr_reader :status
|
22
|
-
# @return [Vellum::EnvironmentEnum] The
|
23
|
-
# * `DEVELOPMENT` - Development
|
24
|
-
# * `STAGING` - Staging
|
25
|
-
# * `PRODUCTION` - Production
|
23
|
+
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
26
24
|
attr_reader :environment
|
27
25
|
# @return [DateTime]
|
28
26
|
attr_reader :created
|
@@ -53,10 +51,7 @@ module Vellum
|
|
53
51
|
# @param status [Vellum::EntityStatus] The current status of the workflow deployment
|
54
52
|
# * `ACTIVE` - Active
|
55
53
|
# * `ARCHIVED` - Archived
|
56
|
-
# @param environment [Vellum::EnvironmentEnum] The
|
57
|
-
# * `DEVELOPMENT` - Development
|
58
|
-
# * `STAGING` - Staging
|
59
|
-
# * `PRODUCTION` - Production
|
54
|
+
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
|
60
55
|
# @param created [DateTime]
|
61
56
|
# @param last_deployed_on [DateTime]
|
62
57
|
# @param last_deployed_history_item_id [String] The ID of the history item associated with this Workflow Deployment's LATEST
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "vellum_audio_request"
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Vellum
|
7
|
+
# The input for an audio variable in a Workflow.
|
8
|
+
class WorkflowRequestAudioInputRequest
|
9
|
+
# @return [String] The variable's name, as defined in the Workflow.
|
10
|
+
attr_reader :name
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :type
|
13
|
+
# @return [Vellum::VellumAudioRequest]
|
14
|
+
attr_reader :value
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param name [String] The variable's name, as defined in the Workflow.
|
24
|
+
# @param type [String]
|
25
|
+
# @param value [Vellum::VellumAudioRequest]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Vellum::WorkflowRequestAudioInputRequest]
|
28
|
+
def initialize(name:, type:, value:, additional_properties: nil)
|
29
|
+
@name = name
|
30
|
+
@type = type
|
31
|
+
@value = value
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "name": name, "type": type, "value": value }
|
34
|
+
end
|
35
|
+
# Deserialize a JSON object to an instance of WorkflowRequestAudioInputRequest
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Vellum::WorkflowRequestAudioInputRequest]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
name = parsed_json["name"]
|
43
|
+
type = parsed_json["type"]
|
44
|
+
unless parsed_json["value"].nil?
|
45
|
+
value = parsed_json["value"].to_json
|
46
|
+
value = Vellum::VellumAudioRequest.from_json(json_object: value)
|
47
|
+
else
|
48
|
+
value = nil
|
49
|
+
end
|
50
|
+
new(
|
51
|
+
name: name,
|
52
|
+
type: type,
|
53
|
+
value: value,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
# Serialize an instance of WorkflowRequestAudioInputRequest to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
71
|
+
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
72
|
+
Vellum::VellumAudioRequest.validate_raw(obj: obj.value)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "vellum_document_request"
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Vellum
|
7
|
+
# The input for a document variable in a Workflow.
|
8
|
+
class WorkflowRequestDocumentInputRequest
|
9
|
+
# @return [String] The variable's name, as defined in the Workflow.
|
10
|
+
attr_reader :name
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :type
|
13
|
+
# @return [Vellum::VellumDocumentRequest]
|
14
|
+
attr_reader :value
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param name [String] The variable's name, as defined in the Workflow.
|
24
|
+
# @param type [String]
|
25
|
+
# @param value [Vellum::VellumDocumentRequest]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Vellum::WorkflowRequestDocumentInputRequest]
|
28
|
+
def initialize(name:, type:, value:, additional_properties: nil)
|
29
|
+
@name = name
|
30
|
+
@type = type
|
31
|
+
@value = value
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "name": name, "type": type, "value": value }
|
34
|
+
end
|
35
|
+
# Deserialize a JSON object to an instance of WorkflowRequestDocumentInputRequest
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Vellum::WorkflowRequestDocumentInputRequest]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
name = parsed_json["name"]
|
43
|
+
type = parsed_json["type"]
|
44
|
+
unless parsed_json["value"].nil?
|
45
|
+
value = parsed_json["value"].to_json
|
46
|
+
value = Vellum::VellumDocumentRequest.from_json(json_object: value)
|
47
|
+
else
|
48
|
+
value = nil
|
49
|
+
end
|
50
|
+
new(
|
51
|
+
name: name,
|
52
|
+
type: type,
|
53
|
+
value: value,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
# Serialize an instance of WorkflowRequestDocumentInputRequest to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
71
|
+
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
72
|
+
Vellum::VellumDocumentRequest.validate_raw(obj: obj.value)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "vellum_image_request"
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Vellum
|
7
|
+
# The input for an image variable in a Workflow.
|
8
|
+
class WorkflowRequestImageInputRequest
|
9
|
+
# @return [String] The variable's name, as defined in the Workflow.
|
10
|
+
attr_reader :name
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :type
|
13
|
+
# @return [Vellum::VellumImageRequest]
|
14
|
+
attr_reader :value
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param name [String] The variable's name, as defined in the Workflow.
|
24
|
+
# @param type [String]
|
25
|
+
# @param value [Vellum::VellumImageRequest]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Vellum::WorkflowRequestImageInputRequest]
|
28
|
+
def initialize(name:, type:, value:, additional_properties: nil)
|
29
|
+
@name = name
|
30
|
+
@type = type
|
31
|
+
@value = value
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "name": name, "type": type, "value": value }
|
34
|
+
end
|
35
|
+
# Deserialize a JSON object to an instance of WorkflowRequestImageInputRequest
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Vellum::WorkflowRequestImageInputRequest]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
name = parsed_json["name"]
|
43
|
+
type = parsed_json["type"]
|
44
|
+
unless parsed_json["value"].nil?
|
45
|
+
value = parsed_json["value"].to_json
|
46
|
+
value = Vellum::VellumImageRequest.from_json(json_object: value)
|
47
|
+
else
|
48
|
+
value = nil
|
49
|
+
end
|
50
|
+
new(
|
51
|
+
name: name,
|
52
|
+
type: type,
|
53
|
+
value: value,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
# Serialize an instance of WorkflowRequestImageInputRequest to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
71
|
+
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
72
|
+
Vellum::VellumImageRequest.validate_raw(obj: obj.value)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -4,6 +4,10 @@ require_relative "workflow_request_string_input_request"
|
|
4
4
|
require_relative "workflow_request_json_input_request"
|
5
5
|
require_relative "workflow_request_chat_history_input_request"
|
6
6
|
require_relative "workflow_request_number_input_request"
|
7
|
+
require_relative "workflow_request_audio_input_request"
|
8
|
+
require_relative "workflow_request_video_input_request"
|
9
|
+
require_relative "workflow_request_image_input_request"
|
10
|
+
require_relative "workflow_request_document_input_request"
|
7
11
|
|
8
12
|
module Vellum
|
9
13
|
class WorkflowRequestInputRequest
|
@@ -51,6 +55,46 @@ end
|
|
51
55
|
return Vellum::WorkflowRequestNumberInputRequest.from_json(json_object: struct)
|
52
56
|
else
|
53
57
|
return nil
|
58
|
+
end
|
59
|
+
rescue StandardError
|
60
|
+
# noop
|
61
|
+
end
|
62
|
+
begin
|
63
|
+
Vellum::WorkflowRequestAudioInputRequest.validate_raw(obj: struct)
|
64
|
+
unless struct.nil?
|
65
|
+
return Vellum::WorkflowRequestAudioInputRequest.from_json(json_object: struct)
|
66
|
+
else
|
67
|
+
return nil
|
68
|
+
end
|
69
|
+
rescue StandardError
|
70
|
+
# noop
|
71
|
+
end
|
72
|
+
begin
|
73
|
+
Vellum::WorkflowRequestVideoInputRequest.validate_raw(obj: struct)
|
74
|
+
unless struct.nil?
|
75
|
+
return Vellum::WorkflowRequestVideoInputRequest.from_json(json_object: struct)
|
76
|
+
else
|
77
|
+
return nil
|
78
|
+
end
|
79
|
+
rescue StandardError
|
80
|
+
# noop
|
81
|
+
end
|
82
|
+
begin
|
83
|
+
Vellum::WorkflowRequestImageInputRequest.validate_raw(obj: struct)
|
84
|
+
unless struct.nil?
|
85
|
+
return Vellum::WorkflowRequestImageInputRequest.from_json(json_object: struct)
|
86
|
+
else
|
87
|
+
return nil
|
88
|
+
end
|
89
|
+
rescue StandardError
|
90
|
+
# noop
|
91
|
+
end
|
92
|
+
begin
|
93
|
+
Vellum::WorkflowRequestDocumentInputRequest.validate_raw(obj: struct)
|
94
|
+
unless struct.nil?
|
95
|
+
return Vellum::WorkflowRequestDocumentInputRequest.from_json(json_object: struct)
|
96
|
+
else
|
97
|
+
return nil
|
54
98
|
end
|
55
99
|
rescue StandardError
|
56
100
|
# noop
|
@@ -84,6 +128,26 @@ end
|
|
84
128
|
rescue StandardError
|
85
129
|
# noop
|
86
130
|
end
|
131
|
+
begin
|
132
|
+
return Vellum::WorkflowRequestAudioInputRequest.validate_raw(obj: obj)
|
133
|
+
rescue StandardError
|
134
|
+
# noop
|
135
|
+
end
|
136
|
+
begin
|
137
|
+
return Vellum::WorkflowRequestVideoInputRequest.validate_raw(obj: obj)
|
138
|
+
rescue StandardError
|
139
|
+
# noop
|
140
|
+
end
|
141
|
+
begin
|
142
|
+
return Vellum::WorkflowRequestImageInputRequest.validate_raw(obj: obj)
|
143
|
+
rescue StandardError
|
144
|
+
# noop
|
145
|
+
end
|
146
|
+
begin
|
147
|
+
return Vellum::WorkflowRequestDocumentInputRequest.validate_raw(obj: obj)
|
148
|
+
rescue StandardError
|
149
|
+
# noop
|
150
|
+
end
|
87
151
|
raise("Passed value matched no type within the union, validation failed.")
|
88
152
|
end
|
89
153
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "vellum_video_request"
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Vellum
|
7
|
+
# The input for a video variable in a Workflow.
|
8
|
+
class WorkflowRequestVideoInputRequest
|
9
|
+
# @return [String] The variable's name, as defined in the Workflow.
|
10
|
+
attr_reader :name
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :type
|
13
|
+
# @return [Vellum::VellumVideoRequest]
|
14
|
+
attr_reader :value
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param name [String] The variable's name, as defined in the Workflow.
|
24
|
+
# @param type [String]
|
25
|
+
# @param value [Vellum::VellumVideoRequest]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Vellum::WorkflowRequestVideoInputRequest]
|
28
|
+
def initialize(name:, type:, value:, additional_properties: nil)
|
29
|
+
@name = name
|
30
|
+
@type = type
|
31
|
+
@value = value
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "name": name, "type": type, "value": value }
|
34
|
+
end
|
35
|
+
# Deserialize a JSON object to an instance of WorkflowRequestVideoInputRequest
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Vellum::WorkflowRequestVideoInputRequest]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
name = parsed_json["name"]
|
43
|
+
type = parsed_json["type"]
|
44
|
+
unless parsed_json["value"].nil?
|
45
|
+
value = parsed_json["value"].to_json
|
46
|
+
value = Vellum::VellumVideoRequest.from_json(json_object: value)
|
47
|
+
else
|
48
|
+
value = nil
|
49
|
+
end
|
50
|
+
new(
|
51
|
+
name: name,
|
52
|
+
type: type,
|
53
|
+
value: value,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
# Serialize an instance of WorkflowRequestVideoInputRequest to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
71
|
+
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
72
|
+
Vellum::VellumVideoRequest.validate_raw(obj: obj.value)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -19,7 +19,6 @@ module Vellum
|
|
19
19
|
@request_client = request_client
|
20
20
|
end
|
21
21
|
# @param id [String] A UUID string identifying this workflow sandbox.
|
22
|
-
# @param workflow_id [String] An ID identifying the Workflow you'd like to deploy.
|
23
22
|
# @param workflow_deployment_id [String] The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot
|
24
23
|
# specify both this and workflow_deployment_name. Leave null to create a new
|
25
24
|
# Workflow Deployment.
|
@@ -40,8 +39,8 @@ module Vellum
|
|
40
39
|
# environment: Vellum::Environment::PRODUCTION,
|
41
40
|
# api_key: "YOUR_API_KEY"
|
42
41
|
# )
|
43
|
-
# api.workflow_sandboxes.deploy_workflow(id: "id"
|
44
|
-
def deploy_workflow(id:,
|
42
|
+
# api.workflow_sandboxes.deploy_workflow(id: "id")
|
43
|
+
def deploy_workflow(id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil)
|
45
44
|
response = @request_client.conn.post do | req |
|
46
45
|
unless request_options&.timeout_in_seconds.nil?
|
47
46
|
req.options.timeout = request_options.timeout_in_seconds
|
@@ -59,7 +58,7 @@ module Vellum
|
|
59
58
|
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
60
59
|
end
|
61
60
|
req.body = { **(request_options&.additional_body_parameters || {}), workflow_deployment_id: workflow_deployment_id, workflow_deployment_name: workflow_deployment_name, label: label, release_tags: release_tags, release_description: release_description }.compact
|
62
|
-
req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/#{id}/
|
61
|
+
req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/#{id}/deploy"
|
63
62
|
end
|
64
63
|
Vellum::WorkflowDeploymentRead.from_json(json_object: response.body)
|
65
64
|
end
|
@@ -113,7 +112,6 @@ end
|
|
113
112
|
@request_client = request_client
|
114
113
|
end
|
115
114
|
# @param id [String] A UUID string identifying this workflow sandbox.
|
116
|
-
# @param workflow_id [String] An ID identifying the Workflow you'd like to deploy.
|
117
115
|
# @param workflow_deployment_id [String] The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot
|
118
116
|
# specify both this and workflow_deployment_name. Leave null to create a new
|
119
117
|
# Workflow Deployment.
|
@@ -134,8 +132,8 @@ end
|
|
134
132
|
# environment: Vellum::Environment::PRODUCTION,
|
135
133
|
# api_key: "YOUR_API_KEY"
|
136
134
|
# )
|
137
|
-
# api.workflow_sandboxes.deploy_workflow(id: "id"
|
138
|
-
def deploy_workflow(id:,
|
135
|
+
# api.workflow_sandboxes.deploy_workflow(id: "id")
|
136
|
+
def deploy_workflow(id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil)
|
139
137
|
Async do
|
140
138
|
response = @request_client.conn.post do | req |
|
141
139
|
unless request_options&.timeout_in_seconds.nil?
|
@@ -154,7 +152,7 @@ end
|
|
154
152
|
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
155
153
|
end
|
156
154
|
req.body = { **(request_options&.additional_body_parameters || {}), workflow_deployment_id: workflow_deployment_id, workflow_deployment_name: workflow_deployment_name, label: label, release_tags: release_tags, release_description: release_description }.compact
|
157
|
-
req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/#{id}/
|
155
|
+
req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-sandboxes/#{id}/deploy"
|
158
156
|
end
|
159
157
|
Vellum::WorkflowDeploymentRead.from_json(json_object: response.body)
|
160
158
|
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vellum
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -790,11 +790,15 @@ files:
|
|
790
790
|
- lib/vellum_ai/types/workflow_push_response.rb
|
791
791
|
- lib/vellum_ai/types/workflow_release_tag_read.rb
|
792
792
|
- lib/vellum_ai/types/workflow_release_tag_workflow_deployment_history_item.rb
|
793
|
+
- lib/vellum_ai/types/workflow_request_audio_input_request.rb
|
793
794
|
- lib/vellum_ai/types/workflow_request_chat_history_input_request.rb
|
795
|
+
- lib/vellum_ai/types/workflow_request_document_input_request.rb
|
796
|
+
- lib/vellum_ai/types/workflow_request_image_input_request.rb
|
794
797
|
- lib/vellum_ai/types/workflow_request_input_request.rb
|
795
798
|
- lib/vellum_ai/types/workflow_request_json_input_request.rb
|
796
799
|
- lib/vellum_ai/types/workflow_request_number_input_request.rb
|
797
800
|
- lib/vellum_ai/types/workflow_request_string_input_request.rb
|
801
|
+
- lib/vellum_ai/types/workflow_request_video_input_request.rb
|
798
802
|
- lib/vellum_ai/types/workflow_result_event.rb
|
799
803
|
- lib/vellum_ai/types/workflow_result_event_output_data.rb
|
800
804
|
- lib/vellum_ai/types/workflow_result_event_output_data_array.rb
|