vellum_ai 1.13.6 → 1.13.7
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: 67b9e55e55e1bf26f4384c0e3465cab3b961c8c7cf6bd09aae614fbf175626ef
|
|
4
|
+
data.tar.gz: 8ce9ad78998a66e88d1978f77a0399a48b86722b222454be000e035b81242a82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bf9d7c028359dc9da6d95bc6d92818f36cf0f1ad1773dbb00979b0fa6506d5e63b337eedd651b0d63b22092168aed82f690ec108afd080526d457dacb2d8482
|
|
7
|
+
data.tar.gz: 541133182a4acbf0f319a149e0561569c5e7cb4f8958a4f24878d8885bcf7a78d41404072b8d9d63bdf9e8d74980e9a5e8d60350b5a385df78a72e3d4112c73d
|
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.13.
|
|
59
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.7' }
|
|
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.13.
|
|
110
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.7' }
|
|
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
|
@@ -175,7 +175,6 @@ require_relative "vellum_ai/types/environment_enum"
|
|
|
175
175
|
require_relative "vellum_ai/types/environment_read"
|
|
176
176
|
require_relative "vellum_ai/types/ephemeral_prompt_cache_config"
|
|
177
177
|
require_relative "vellum_ai/types/ephemeral_prompt_cache_config_type_enum"
|
|
178
|
-
require_relative "vellum_ai/types/error_detail_response"
|
|
179
178
|
require_relative "vellum_ai/types/error_vellum_value"
|
|
180
179
|
require_relative "vellum_ai/types/error_vellum_value_request"
|
|
181
180
|
require_relative "vellum_ai/types/event_create_response"
|
|
@@ -14,6 +14,8 @@ module Vellum
|
|
|
14
14
|
attr_reader :content
|
|
15
15
|
# @return [String] An optional identifier representing who or what generated this message.
|
|
16
16
|
attr_reader :source
|
|
17
|
+
# @return [Hash{String => Object}]
|
|
18
|
+
attr_reader :metadata
|
|
17
19
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
18
20
|
attr_reader :additional_properties
|
|
19
21
|
# @return [Object]
|
|
@@ -26,15 +28,17 @@ module Vellum
|
|
|
26
28
|
# @param role [Vellum::ChatMessageRole]
|
|
27
29
|
# @param content [Vellum::ChatMessageContent]
|
|
28
30
|
# @param source [String] An optional identifier representing who or what generated this message.
|
|
31
|
+
# @param metadata [Hash{String => Object}]
|
|
29
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
30
33
|
# @return [Vellum::ChatMessage]
|
|
31
|
-
def initialize(text: OMIT, role:, content: OMIT, source: OMIT, additional_properties: nil)
|
|
34
|
+
def initialize(text: OMIT, role:, content: OMIT, source: OMIT, metadata: OMIT, additional_properties: nil)
|
|
32
35
|
@text = text if text != OMIT
|
|
33
36
|
@role = role
|
|
34
37
|
@content = content if content != OMIT
|
|
35
38
|
@source = source if source != OMIT
|
|
39
|
+
@metadata = metadata if metadata != OMIT
|
|
36
40
|
@additional_properties = additional_properties
|
|
37
|
-
@_field_set = { "text": text, "role": role, "content": content, "source": source }.reject do | _k, v |
|
|
41
|
+
@_field_set = { "text": text, "role": role, "content": content, "source": source, "metadata": metadata }.reject do | _k, v |
|
|
38
42
|
v == OMIT
|
|
39
43
|
end
|
|
40
44
|
end
|
|
@@ -54,11 +58,13 @@ end
|
|
|
54
58
|
content = nil
|
|
55
59
|
end
|
|
56
60
|
source = parsed_json["source"]
|
|
61
|
+
metadata = parsed_json["metadata"]
|
|
57
62
|
new(
|
|
58
63
|
text: text,
|
|
59
64
|
role: role,
|
|
60
65
|
content: content,
|
|
61
66
|
source: source,
|
|
67
|
+
metadata: metadata,
|
|
62
68
|
additional_properties: struct
|
|
63
69
|
)
|
|
64
70
|
end
|
|
@@ -79,6 +85,7 @@ end
|
|
|
79
85
|
obj.role.is_a?(Vellum::ChatMessageRole) != false || raise("Passed value for field obj.role is not the expected type, validation failed.")
|
|
80
86
|
obj.content.nil? || Vellum::ChatMessageContent.validate_raw(obj: obj.content)
|
|
81
87
|
obj.source&.is_a?(String) != false || raise("Passed value for field obj.source is not the expected type, validation failed.")
|
|
88
|
+
obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
82
89
|
end
|
|
83
90
|
end
|
|
84
91
|
end
|
|
@@ -14,6 +14,8 @@ module Vellum
|
|
|
14
14
|
attr_reader :content
|
|
15
15
|
# @return [String] An optional identifier representing who or what generated this message.
|
|
16
16
|
attr_reader :source
|
|
17
|
+
# @return [Hash{String => Object}]
|
|
18
|
+
attr_reader :metadata
|
|
17
19
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
18
20
|
attr_reader :additional_properties
|
|
19
21
|
# @return [Object]
|
|
@@ -26,15 +28,17 @@ module Vellum
|
|
|
26
28
|
# @param role [Vellum::ChatMessageRole]
|
|
27
29
|
# @param content [Vellum::ChatMessageContentRequest]
|
|
28
30
|
# @param source [String] An optional identifier representing who or what generated this message.
|
|
31
|
+
# @param metadata [Hash{String => Object}]
|
|
29
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
30
33
|
# @return [Vellum::ChatMessageRequest]
|
|
31
|
-
def initialize(text: OMIT, role:, content: OMIT, source: OMIT, additional_properties: nil)
|
|
34
|
+
def initialize(text: OMIT, role:, content: OMIT, source: OMIT, metadata: OMIT, additional_properties: nil)
|
|
32
35
|
@text = text if text != OMIT
|
|
33
36
|
@role = role
|
|
34
37
|
@content = content if content != OMIT
|
|
35
38
|
@source = source if source != OMIT
|
|
39
|
+
@metadata = metadata if metadata != OMIT
|
|
36
40
|
@additional_properties = additional_properties
|
|
37
|
-
@_field_set = { "text": text, "role": role, "content": content, "source": source }.reject do | _k, v |
|
|
41
|
+
@_field_set = { "text": text, "role": role, "content": content, "source": source, "metadata": metadata }.reject do | _k, v |
|
|
38
42
|
v == OMIT
|
|
39
43
|
end
|
|
40
44
|
end
|
|
@@ -54,11 +58,13 @@ end
|
|
|
54
58
|
content = nil
|
|
55
59
|
end
|
|
56
60
|
source = parsed_json["source"]
|
|
61
|
+
metadata = parsed_json["metadata"]
|
|
57
62
|
new(
|
|
58
63
|
text: text,
|
|
59
64
|
role: role,
|
|
60
65
|
content: content,
|
|
61
66
|
source: source,
|
|
67
|
+
metadata: metadata,
|
|
62
68
|
additional_properties: struct
|
|
63
69
|
)
|
|
64
70
|
end
|
|
@@ -79,6 +85,7 @@ end
|
|
|
79
85
|
obj.role.is_a?(Vellum::ChatMessageRole) != false || raise("Passed value for field obj.role is not the expected type, validation failed.")
|
|
80
86
|
obj.content.nil? || Vellum::ChatMessageContentRequest.validate_raw(obj: obj.content)
|
|
81
87
|
obj.source&.is_a?(String) != false || raise("Passed value for field obj.source is not the expected type, validation failed.")
|
|
88
|
+
obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
82
89
|
end
|
|
83
90
|
end
|
|
84
91
|
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.13.
|
|
4
|
+
version: 1.13.7
|
|
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-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -282,7 +282,6 @@ files:
|
|
|
282
282
|
- lib/vellum_ai/types/environment_read.rb
|
|
283
283
|
- lib/vellum_ai/types/ephemeral_prompt_cache_config.rb
|
|
284
284
|
- lib/vellum_ai/types/ephemeral_prompt_cache_config_type_enum.rb
|
|
285
|
-
- lib/vellum_ai/types/error_detail_response.rb
|
|
286
285
|
- lib/vellum_ai/types/error_input.rb
|
|
287
286
|
- lib/vellum_ai/types/error_vellum_value.rb
|
|
288
287
|
- lib/vellum_ai/types/error_vellum_value_request.rb
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require "ostruct"
|
|
3
|
-
require "json"
|
|
4
|
-
|
|
5
|
-
module Vellum
|
|
6
|
-
class ErrorDetailResponse
|
|
7
|
-
# @return [String] Message informing the user of the error.
|
|
8
|
-
attr_reader :detail
|
|
9
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
10
|
-
attr_reader :additional_properties
|
|
11
|
-
# @return [Object]
|
|
12
|
-
attr_reader :_field_set
|
|
13
|
-
protected :_field_set
|
|
14
|
-
|
|
15
|
-
OMIT = Object.new
|
|
16
|
-
|
|
17
|
-
# @param detail [String] Message informing the user of the error.
|
|
18
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
19
|
-
# @return [Vellum::ErrorDetailResponse]
|
|
20
|
-
def initialize(detail:, additional_properties: nil)
|
|
21
|
-
@detail = detail
|
|
22
|
-
@additional_properties = additional_properties
|
|
23
|
-
@_field_set = { "detail": detail }
|
|
24
|
-
end
|
|
25
|
-
# Deserialize a JSON object to an instance of ErrorDetailResponse
|
|
26
|
-
#
|
|
27
|
-
# @param json_object [String]
|
|
28
|
-
# @return [Vellum::ErrorDetailResponse]
|
|
29
|
-
def self.from_json(json_object:)
|
|
30
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
31
|
-
parsed_json = JSON.parse(json_object)
|
|
32
|
-
detail = parsed_json["detail"]
|
|
33
|
-
new(detail: detail, additional_properties: struct)
|
|
34
|
-
end
|
|
35
|
-
# Serialize an instance of ErrorDetailResponse to a JSON object
|
|
36
|
-
#
|
|
37
|
-
# @return [String]
|
|
38
|
-
def to_json
|
|
39
|
-
@_field_set&.to_json
|
|
40
|
-
end
|
|
41
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
42
|
-
# hash and check each fields type against the current object's property
|
|
43
|
-
# definitions.
|
|
44
|
-
#
|
|
45
|
-
# @param obj [Object]
|
|
46
|
-
# @return [Void]
|
|
47
|
-
def self.validate_raw(obj:)
|
|
48
|
-
obj.detail.is_a?(String) != false || raise("Passed value for field obj.detail is not the expected type, validation failed.")
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|