Class: Vellum::AsyncWorkflowSandboxesClient
- Inherits:
-
Object
- Object
- Vellum::AsyncWorkflowSandboxesClient
- Defined in:
- lib/vellum_ai/workflow_sandboxes/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#deploy_workflow(id:, workflow_id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.deploy_workflow(id: “id”, workflow_id: “workflow_id”).
- #initialize(request_client:) ⇒ Vellum::AsyncWorkflowSandboxesClient constructor
-
#list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.list_workflow_sandbox_examples.
Constructor Details
#initialize(request_client:) ⇒ Vellum::AsyncWorkflowSandboxesClient
112 113 114 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 112 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ Vellum::AsyncRequestClient (readonly)
107 108 109 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 107 def request_client @request_client end |
Instance Method Details
#deploy_workflow(id:, workflow_id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.deploy_workflow(id: “id”, workflow_id: “workflow_id”)
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 138 def deploy_workflow(id:, workflow_id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil) Async do response = @request_client.conn.post do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact unless .nil? || &.additional_query_parameters.nil? req.params = { **(&.additional_query_parameters || {}) }.compact end req.body = { **(&.additional_body_parameters || {}), workflow_deployment_id: workflow_deployment_id, workflow_deployment_name: workflow_deployment_name, label: label, release_tags: , release_description: release_description }.compact req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/workflow-sandboxes/#{id}/workflows/#{workflow_id}/deploy" end Vellum::WorkflowDeploymentRead.from_json(json_object: response.body) end end |
#list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.list_workflow_sandbox_examples
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 178 def list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil) Async do response = @request_client.conn.get do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "limit": limit, "offset": offset, "ordering": ordering, "tag": tag }.compact unless .nil? || &.additional_body_parameters.nil? req.body = { **(&.additional_body_parameters || {}) }.compact end req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/workflow-sandboxes/examples" end Vellum::PaginatedWorkflowSandboxExampleList.from_json(json_object: response.body) end end |