vellum_ai 1.5.2 → 1.5.3
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 +2 -0
- data/lib/vellum_ai/document_indexes/client.rb +6 -8
- data/lib/vellum_ai/types/indexing_config_vectorizer.rb +16 -0
- data/lib/vellum_ai/types/indexing_config_vectorizer_request.rb +16 -0
- data/lib/vellum_ai/types/private_vectorizer.rb +52 -0
- data/lib/vellum_ai/types/private_vectorizer_request.rb +52 -0
- data/lib/vellum_ai/types/vellum_error_code_enum.rb +2 -2
- data/lib/vellum_ai/workflow_deployments/client.rb +6 -4
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e98468526aac99672cba57d3906ddb26843b306b8cca3a0a7f1311ab7309401f
|
4
|
+
data.tar.gz: d565f23d3e92118dff1457cb2f6ded023e8ef8cfcea7536e8ecf0d09c31066ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92aa63dada44b2a6ac38f36d57a216751950a7d1b19b0991b21f552a9076cf32155a7b20659f5d429a81946ce6d057d877b4e8df6f1c36f53bdd20133c654737
|
7
|
+
data.tar.gz: 87d055b4d7d15bf13d4676a05e949911e1adf0c071a80d948d9f124de8ec0dd931ad022add751f5ae1b43c0572f941b2ea0798e421e5ce2387aafbf70c5fb8d4
|
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.5.
|
59
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.5.3' }
|
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.5.
|
110
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.5.3' }
|
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
@@ -255,10 +255,12 @@ require_relative "vellum_ai/types/image_vellum_value_request"
|
|
255
255
|
require_relative "vellum_ai/types/open_ai_vectorizer_text_embedding_3_small"
|
256
256
|
require_relative "vellum_ai/types/open_ai_vectorizer_text_embedding_3_large"
|
257
257
|
require_relative "vellum_ai/types/open_ai_vectorizer_text_embedding_ada_002"
|
258
|
+
require_relative "vellum_ai/types/private_vectorizer"
|
258
259
|
require_relative "vellum_ai/types/indexing_config_vectorizer"
|
259
260
|
require_relative "vellum_ai/types/open_ai_vectorizer_text_embedding_3_small_request"
|
260
261
|
require_relative "vellum_ai/types/open_ai_vectorizer_text_embedding_3_large_request"
|
261
262
|
require_relative "vellum_ai/types/open_ai_vectorizer_text_embedding_ada_002_request"
|
263
|
+
require_relative "vellum_ai/types/private_vectorizer_request"
|
262
264
|
require_relative "vellum_ai/types/indexing_config_vectorizer_request"
|
263
265
|
require_relative "vellum_ai/types/indexing_state_enum"
|
264
266
|
require_relative "vellum_ai/types/initiated_prompt_execution_meta"
|
@@ -117,6 +117,7 @@ end
|
|
117
117
|
# Used to retrieve a Document Index given its ID or name.
|
118
118
|
#
|
119
119
|
# @param id [String] Either the Document Index's ID or its unique name
|
120
|
+
# @param mask_indexing_config [Boolean] Whether to mask the indexing configuration in the response
|
120
121
|
# @param request_options [Vellum::RequestOptions]
|
121
122
|
# @return [Vellum::DocumentIndexRead]
|
122
123
|
# @example
|
@@ -126,7 +127,7 @@ end
|
|
126
127
|
# api_key: "YOUR_API_KEY"
|
127
128
|
# )
|
128
129
|
# api.document_indexes.retrieve(id: "id")
|
129
|
-
def retrieve(id:, request_options: nil)
|
130
|
+
def retrieve(id:, mask_indexing_config: nil, request_options: nil)
|
130
131
|
response = @request_client.conn.get do | req |
|
131
132
|
unless request_options&.timeout_in_seconds.nil?
|
132
133
|
req.options.timeout = request_options.timeout_in_seconds
|
@@ -140,9 +141,7 @@ end
|
|
140
141
|
req.headers["X-API-Version"] = "2025-07-30"
|
141
142
|
end
|
142
143
|
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
143
|
-
|
144
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
145
|
-
end
|
144
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "mask_indexing_config": mask_indexing_config }.compact
|
146
145
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
147
146
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
148
147
|
end
|
@@ -443,6 +442,7 @@ end
|
|
443
442
|
# Used to retrieve a Document Index given its ID or name.
|
444
443
|
#
|
445
444
|
# @param id [String] Either the Document Index's ID or its unique name
|
445
|
+
# @param mask_indexing_config [Boolean] Whether to mask the indexing configuration in the response
|
446
446
|
# @param request_options [Vellum::RequestOptions]
|
447
447
|
# @return [Vellum::DocumentIndexRead]
|
448
448
|
# @example
|
@@ -452,7 +452,7 @@ end
|
|
452
452
|
# api_key: "YOUR_API_KEY"
|
453
453
|
# )
|
454
454
|
# api.document_indexes.retrieve(id: "id")
|
455
|
-
def retrieve(id:, request_options: nil)
|
455
|
+
def retrieve(id:, mask_indexing_config: nil, request_options: nil)
|
456
456
|
Async do
|
457
457
|
response = @request_client.conn.get do | req |
|
458
458
|
unless request_options&.timeout_in_seconds.nil?
|
@@ -467,9 +467,7 @@ end
|
|
467
467
|
req.headers["X-API-Version"] = "2025-07-30"
|
468
468
|
end
|
469
469
|
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
470
|
-
|
471
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
472
|
-
end
|
470
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "mask_indexing_config": mask_indexing_config }.compact
|
473
471
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
474
472
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
475
473
|
end
|
@@ -11,6 +11,7 @@ require_relative "google_vertex_ai_vectorizer_text_embedding_004"
|
|
11
11
|
require_relative "google_vertex_ai_vectorizer_text_multilingual_embedding_002"
|
12
12
|
require_relative "google_vertex_ai_vectorizer_gemini_embedding_001"
|
13
13
|
require_relative "fast_embed_vectorizer_baai_bge_small_en_v_15"
|
14
|
+
require_relative "private_vectorizer"
|
14
15
|
|
15
16
|
module Vellum
|
16
17
|
class IndexingConfigVectorizer
|
@@ -128,6 +129,16 @@ end
|
|
128
129
|
return Vellum::FastEmbedVectorizerBaaiBgeSmallEnV15.from_json(json_object: struct)
|
129
130
|
else
|
130
131
|
return nil
|
132
|
+
end
|
133
|
+
rescue StandardError
|
134
|
+
# noop
|
135
|
+
end
|
136
|
+
begin
|
137
|
+
Vellum::PrivateVectorizer.validate_raw(obj: struct)
|
138
|
+
unless struct.nil?
|
139
|
+
return Vellum::PrivateVectorizer.from_json(json_object: struct)
|
140
|
+
else
|
141
|
+
return nil
|
131
142
|
end
|
132
143
|
rescue StandardError
|
133
144
|
# noop
|
@@ -196,6 +207,11 @@ end
|
|
196
207
|
rescue StandardError
|
197
208
|
# noop
|
198
209
|
end
|
210
|
+
begin
|
211
|
+
return Vellum::PrivateVectorizer.validate_raw(obj: obj)
|
212
|
+
rescue StandardError
|
213
|
+
# noop
|
214
|
+
end
|
199
215
|
raise("Passed value matched no type within the union, validation failed.")
|
200
216
|
end
|
201
217
|
end
|
@@ -11,6 +11,7 @@ require_relative "google_vertex_ai_vectorizer_text_embedding_004_request"
|
|
11
11
|
require_relative "google_vertex_ai_vectorizer_text_multilingual_embedding_002_request"
|
12
12
|
require_relative "google_vertex_ai_vectorizer_gemini_embedding_001_request"
|
13
13
|
require_relative "fast_embed_vectorizer_baai_bge_small_en_v_15_request"
|
14
|
+
require_relative "private_vectorizer_request"
|
14
15
|
|
15
16
|
module Vellum
|
16
17
|
class IndexingConfigVectorizerRequest
|
@@ -128,6 +129,16 @@ end
|
|
128
129
|
return Vellum::FastEmbedVectorizerBaaiBgeSmallEnV15Request.from_json(json_object: struct)
|
129
130
|
else
|
130
131
|
return nil
|
132
|
+
end
|
133
|
+
rescue StandardError
|
134
|
+
# noop
|
135
|
+
end
|
136
|
+
begin
|
137
|
+
Vellum::PrivateVectorizerRequest.validate_raw(obj: struct)
|
138
|
+
unless struct.nil?
|
139
|
+
return Vellum::PrivateVectorizerRequest.from_json(json_object: struct)
|
140
|
+
else
|
141
|
+
return nil
|
131
142
|
end
|
132
143
|
rescue StandardError
|
133
144
|
# noop
|
@@ -196,6 +207,11 @@ end
|
|
196
207
|
rescue StandardError
|
197
208
|
# noop
|
198
209
|
end
|
210
|
+
begin
|
211
|
+
return Vellum::PrivateVectorizerRequest.validate_raw(obj: obj)
|
212
|
+
rescue StandardError
|
213
|
+
# noop
|
214
|
+
end
|
199
215
|
raise("Passed value matched no type within the union, validation failed.")
|
200
216
|
end
|
201
217
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "ostruct"
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Vellum
|
6
|
+
# Serializer for private vectorizer.
|
7
|
+
class PrivateVectorizer
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :model_name
|
10
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
+
attr_reader :additional_properties
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :_field_set
|
14
|
+
protected :_field_set
|
15
|
+
|
16
|
+
OMIT = Object.new
|
17
|
+
|
18
|
+
# @param model_name [String]
|
19
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
# @return [Vellum::PrivateVectorizer]
|
21
|
+
def initialize(model_name:, additional_properties: nil)
|
22
|
+
@model_name = model_name
|
23
|
+
@additional_properties = additional_properties
|
24
|
+
@_field_set = { "model_name": model_name }
|
25
|
+
end
|
26
|
+
# Deserialize a JSON object to an instance of PrivateVectorizer
|
27
|
+
#
|
28
|
+
# @param json_object [String]
|
29
|
+
# @return [Vellum::PrivateVectorizer]
|
30
|
+
def self.from_json(json_object:)
|
31
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
+
parsed_json = JSON.parse(json_object)
|
33
|
+
model_name = parsed_json["model_name"]
|
34
|
+
new(model_name: model_name, additional_properties: struct)
|
35
|
+
end
|
36
|
+
# Serialize an instance of PrivateVectorizer to a JSON object
|
37
|
+
#
|
38
|
+
# @return [String]
|
39
|
+
def to_json
|
40
|
+
@_field_set&.to_json
|
41
|
+
end
|
42
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
43
|
+
# hash and check each fields type against the current object's property
|
44
|
+
# definitions.
|
45
|
+
#
|
46
|
+
# @param obj [Object]
|
47
|
+
# @return [Void]
|
48
|
+
def self.validate_raw(obj:)
|
49
|
+
obj.model_name.is_a?(String) != false || raise("Passed value for field obj.model_name is not the expected type, validation failed.")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "ostruct"
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Vellum
|
6
|
+
# Serializer for private vectorizer.
|
7
|
+
class PrivateVectorizerRequest
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :model_name
|
10
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
+
attr_reader :additional_properties
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :_field_set
|
14
|
+
protected :_field_set
|
15
|
+
|
16
|
+
OMIT = Object.new
|
17
|
+
|
18
|
+
# @param model_name [String]
|
19
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
# @return [Vellum::PrivateVectorizerRequest]
|
21
|
+
def initialize(model_name:, additional_properties: nil)
|
22
|
+
@model_name = model_name
|
23
|
+
@additional_properties = additional_properties
|
24
|
+
@_field_set = { "model_name": model_name }
|
25
|
+
end
|
26
|
+
# Deserialize a JSON object to an instance of PrivateVectorizerRequest
|
27
|
+
#
|
28
|
+
# @param json_object [String]
|
29
|
+
# @return [Vellum::PrivateVectorizerRequest]
|
30
|
+
def self.from_json(json_object:)
|
31
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
+
parsed_json = JSON.parse(json_object)
|
33
|
+
model_name = parsed_json["model_name"]
|
34
|
+
new(model_name: model_name, additional_properties: struct)
|
35
|
+
end
|
36
|
+
# Serialize an instance of PrivateVectorizerRequest to a JSON object
|
37
|
+
#
|
38
|
+
# @return [String]
|
39
|
+
def to_json
|
40
|
+
@_field_set&.to_json
|
41
|
+
end
|
42
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
43
|
+
# hash and check each fields type against the current object's property
|
44
|
+
# definitions.
|
45
|
+
#
|
46
|
+
# @param obj [Object]
|
47
|
+
# @return [Void]
|
48
|
+
def self.validate_raw(obj:)
|
49
|
+
obj.model_name.is_a?(String) != false || raise("Passed value for field obj.model_name is not the expected type, validation failed.")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -4,7 +4,7 @@ module Vellum
|
|
4
4
|
# * `INVALID_REQUEST` - INVALID_REQUEST
|
5
5
|
# * `INVALID_INPUTS` - INVALID_INPUTS
|
6
6
|
# * `PROVIDER_ERROR` - PROVIDER_ERROR
|
7
|
-
# * `
|
7
|
+
# * `PROVIDER_CREDENTIALS_UNAVAILABLE` - PROVIDER_CREDENTIALS_UNAVAILABLE
|
8
8
|
# * `REQUEST_TIMEOUT` - REQUEST_TIMEOUT
|
9
9
|
# * `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR
|
10
10
|
# * `USER_DEFINED_ERROR` - USER_DEFINED_ERROR
|
@@ -14,7 +14,7 @@ module Vellum
|
|
14
14
|
INVALID_REQUEST = "INVALID_REQUEST"
|
15
15
|
INVALID_INPUTS = "INVALID_INPUTS"
|
16
16
|
PROVIDER_ERROR = "PROVIDER_ERROR"
|
17
|
-
|
17
|
+
PROVIDER_CREDENTIALS_UNAVAILABLE = "PROVIDER_CREDENTIALS_UNAVAILABLE"
|
18
18
|
REQUEST_TIMEOUT = "REQUEST_TIMEOUT"
|
19
19
|
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR"
|
20
20
|
USER_DEFINED_ERROR = "USER_DEFINED_ERROR"
|
@@ -109,6 +109,7 @@ end
|
|
109
109
|
# @param filters [String]
|
110
110
|
# @param limit [Integer] Number of executions to return per page.
|
111
111
|
# @param offset [Integer] The initial index from which to return the executions.
|
112
|
+
# @param ordering [String]
|
112
113
|
# @param request_options [Vellum::RequestOptions]
|
113
114
|
# @return [Vellum::WorkflowDeploymentEventExecutionsResponse]
|
114
115
|
# @example
|
@@ -118,7 +119,7 @@ end
|
|
118
119
|
# api_key: "YOUR_API_KEY"
|
119
120
|
# )
|
120
121
|
# api.workflow_deployments.list_workflow_deployment_event_executions(id: "id")
|
121
|
-
def list_workflow_deployment_event_executions(id:, filters: nil, limit: nil, offset: nil, request_options: nil)
|
122
|
+
def list_workflow_deployment_event_executions(id:, filters: nil, limit: nil, offset: nil, ordering: nil, request_options: nil)
|
122
123
|
response = @request_client.conn.get do | req |
|
123
124
|
unless request_options&.timeout_in_seconds.nil?
|
124
125
|
req.options.timeout = request_options.timeout_in_seconds
|
@@ -132,7 +133,7 @@ end
|
|
132
133
|
req.headers["X-API-Version"] = "2025-07-30"
|
133
134
|
end
|
134
135
|
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
135
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "filters": filters, "limit": limit, "offset": offset }.compact
|
136
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "filters": filters, "limit": limit, "offset": offset, "ordering": ordering }.compact
|
136
137
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
137
138
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
138
139
|
end
|
@@ -463,6 +464,7 @@ end
|
|
463
464
|
# @param filters [String]
|
464
465
|
# @param limit [Integer] Number of executions to return per page.
|
465
466
|
# @param offset [Integer] The initial index from which to return the executions.
|
467
|
+
# @param ordering [String]
|
466
468
|
# @param request_options [Vellum::RequestOptions]
|
467
469
|
# @return [Vellum::WorkflowDeploymentEventExecutionsResponse]
|
468
470
|
# @example
|
@@ -472,7 +474,7 @@ end
|
|
472
474
|
# api_key: "YOUR_API_KEY"
|
473
475
|
# )
|
474
476
|
# api.workflow_deployments.list_workflow_deployment_event_executions(id: "id")
|
475
|
-
def list_workflow_deployment_event_executions(id:, filters: nil, limit: nil, offset: nil, request_options: nil)
|
477
|
+
def list_workflow_deployment_event_executions(id:, filters: nil, limit: nil, offset: nil, ordering: nil, request_options: nil)
|
476
478
|
Async do
|
477
479
|
response = @request_client.conn.get do | req |
|
478
480
|
unless request_options&.timeout_in_seconds.nil?
|
@@ -487,7 +489,7 @@ end
|
|
487
489
|
req.headers["X-API-Version"] = "2025-07-30"
|
488
490
|
end
|
489
491
|
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
490
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "filters": filters, "limit": limit, "offset": offset }.compact
|
492
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "filters": filters, "limit": limit, "offset": offset, "ordering": ordering }.compact
|
491
493
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
492
494
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
493
495
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vellum_ai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vellum
|
@@ -497,6 +497,8 @@ files:
|
|
497
497
|
- lib/vellum_ai/types/pdf_search_result_meta_source_request.rb
|
498
498
|
- lib/vellum_ai/types/plain_text_prompt_block.rb
|
499
499
|
- lib/vellum_ai/types/price.rb
|
500
|
+
- lib/vellum_ai/types/private_vectorizer.rb
|
501
|
+
- lib/vellum_ai/types/private_vectorizer_request.rb
|
500
502
|
- lib/vellum_ai/types/processing_failure_reason_enum.rb
|
501
503
|
- lib/vellum_ai/types/prompt_block.rb
|
502
504
|
- lib/vellum_ai/types/prompt_block_state.rb
|