vellum_ai 1.14.0 → 1.14.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: e5100c1227c467ec2f808faae228992bcafe0082a3280581fb6ae6a78ad698e7
|
|
4
|
+
data.tar.gz: 90d0272745f76e3b8f713316b35d7f6dc9e1f3d52ccdeb5c17ddbade2ba4d8b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afe60b684430e9b551e797335369a3754a72209c24aa68e6664ebbd1b3ceadf32376241ceb80278e91060674b05cd729772903553175fc22f25686826ef894c0
|
|
7
|
+
data.tar.gz: afc65791583bde925f2cac1ca0b6fe98bb228ebffa578ba1d885fd2db9cdf7ff465d6c6e575bf478d3a70da1719a35795046e797e43a93c81b31241771971ec7
|
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.14.
|
|
59
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.14.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.14.
|
|
110
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.14.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
|
|
@@ -16,6 +16,8 @@ module Vellum
|
|
|
16
16
|
attr_reader :execution_id
|
|
17
17
|
# @return [Vellum::AdHocFulfilledPromptExecutionMeta]
|
|
18
18
|
attr_reader :meta
|
|
19
|
+
# @return [Hash{String => Object}]
|
|
20
|
+
attr_reader :chat_message_metadata
|
|
19
21
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
20
22
|
attr_reader :additional_properties
|
|
21
23
|
# @return [Object]
|
|
@@ -28,15 +30,17 @@ module Vellum
|
|
|
28
30
|
# @param outputs [Array<Vellum::PromptOutput>]
|
|
29
31
|
# @param execution_id [String]
|
|
30
32
|
# @param meta [Vellum::AdHocFulfilledPromptExecutionMeta]
|
|
33
|
+
# @param chat_message_metadata [Hash{String => Object}]
|
|
31
34
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
32
35
|
# @return [Vellum::FulfilledAdHocExecutePromptEvent]
|
|
33
|
-
def initialize(state:, outputs:, execution_id:, meta: OMIT, additional_properties: nil)
|
|
36
|
+
def initialize(state:, outputs:, execution_id:, meta: OMIT, chat_message_metadata: OMIT, additional_properties: nil)
|
|
34
37
|
@state = state
|
|
35
38
|
@outputs = outputs
|
|
36
39
|
@execution_id = execution_id
|
|
37
40
|
@meta = meta if meta != OMIT
|
|
41
|
+
@chat_message_metadata = chat_message_metadata if chat_message_metadata != OMIT
|
|
38
42
|
@additional_properties = additional_properties
|
|
39
|
-
@_field_set = { "state": state, "outputs": outputs, "execution_id": execution_id, "meta": meta }.reject do | _k, v |
|
|
43
|
+
@_field_set = { "state": state, "outputs": outputs, "execution_id": execution_id, "meta": meta, "chat_message_metadata": chat_message_metadata }.reject do | _k, v |
|
|
40
44
|
v == OMIT
|
|
41
45
|
end
|
|
42
46
|
end
|
|
@@ -59,11 +63,13 @@ end
|
|
|
59
63
|
else
|
|
60
64
|
meta = nil
|
|
61
65
|
end
|
|
66
|
+
chat_message_metadata = parsed_json["chat_message_metadata"]
|
|
62
67
|
new(
|
|
63
68
|
state: state,
|
|
64
69
|
outputs: outputs,
|
|
65
70
|
execution_id: execution_id,
|
|
66
71
|
meta: meta,
|
|
72
|
+
chat_message_metadata: chat_message_metadata,
|
|
67
73
|
additional_properties: struct
|
|
68
74
|
)
|
|
69
75
|
end
|
|
@@ -84,6 +90,7 @@ end
|
|
|
84
90
|
obj.outputs.is_a?(Array) != false || raise("Passed value for field obj.outputs is not the expected type, validation failed.")
|
|
85
91
|
obj.execution_id.is_a?(String) != false || raise("Passed value for field obj.execution_id is not the expected type, validation failed.")
|
|
86
92
|
obj.meta.nil? || Vellum::AdHocFulfilledPromptExecutionMeta.validate_raw(obj: obj.meta)
|
|
93
|
+
obj.chat_message_metadata&.is_a?(Hash) != false || raise("Passed value for field obj.chat_message_metadata is not the expected type, validation failed.")
|
|
87
94
|
end
|
|
88
95
|
end
|
|
89
96
|
end
|
|
@@ -16,6 +16,8 @@ module Vellum
|
|
|
16
16
|
attr_reader :execution_id
|
|
17
17
|
# @return [Vellum::FulfilledPromptExecutionMeta]
|
|
18
18
|
attr_reader :meta
|
|
19
|
+
# @return [Hash{String => Object}]
|
|
20
|
+
attr_reader :chat_message_metadata
|
|
19
21
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
20
22
|
attr_reader :additional_properties
|
|
21
23
|
# @return [Object]
|
|
@@ -28,15 +30,17 @@ module Vellum
|
|
|
28
30
|
# @param outputs [Array<Vellum::PromptOutput>]
|
|
29
31
|
# @param execution_id [String]
|
|
30
32
|
# @param meta [Vellum::FulfilledPromptExecutionMeta]
|
|
33
|
+
# @param chat_message_metadata [Hash{String => Object}]
|
|
31
34
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
32
35
|
# @return [Vellum::FulfilledExecutePromptEvent]
|
|
33
|
-
def initialize(state:, outputs:, execution_id:, meta: OMIT, additional_properties: nil)
|
|
36
|
+
def initialize(state:, outputs:, execution_id:, meta: OMIT, chat_message_metadata: OMIT, additional_properties: nil)
|
|
34
37
|
@state = state
|
|
35
38
|
@outputs = outputs
|
|
36
39
|
@execution_id = execution_id
|
|
37
40
|
@meta = meta if meta != OMIT
|
|
41
|
+
@chat_message_metadata = chat_message_metadata if chat_message_metadata != OMIT
|
|
38
42
|
@additional_properties = additional_properties
|
|
39
|
-
@_field_set = { "state": state, "outputs": outputs, "execution_id": execution_id, "meta": meta }.reject do | _k, v |
|
|
43
|
+
@_field_set = { "state": state, "outputs": outputs, "execution_id": execution_id, "meta": meta, "chat_message_metadata": chat_message_metadata }.reject do | _k, v |
|
|
40
44
|
v == OMIT
|
|
41
45
|
end
|
|
42
46
|
end
|
|
@@ -59,11 +63,13 @@ end
|
|
|
59
63
|
else
|
|
60
64
|
meta = nil
|
|
61
65
|
end
|
|
66
|
+
chat_message_metadata = parsed_json["chat_message_metadata"]
|
|
62
67
|
new(
|
|
63
68
|
state: state,
|
|
64
69
|
outputs: outputs,
|
|
65
70
|
execution_id: execution_id,
|
|
66
71
|
meta: meta,
|
|
72
|
+
chat_message_metadata: chat_message_metadata,
|
|
67
73
|
additional_properties: struct
|
|
68
74
|
)
|
|
69
75
|
end
|
|
@@ -84,6 +90,7 @@ end
|
|
|
84
90
|
obj.outputs.is_a?(Array) != false || raise("Passed value for field obj.outputs is not the expected type, validation failed.")
|
|
85
91
|
obj.execution_id.is_a?(String) != false || raise("Passed value for field obj.execution_id is not the expected type, validation failed.")
|
|
86
92
|
obj.meta.nil? || Vellum::FulfilledPromptExecutionMeta.validate_raw(obj: obj.meta)
|
|
93
|
+
obj.chat_message_metadata&.is_a?(Hash) != false || raise("Passed value for field obj.chat_message_metadata is not the expected type, validation failed.")
|
|
87
94
|
end
|
|
88
95
|
end
|
|
89
96
|
end
|
|
@@ -19,6 +19,8 @@ module Vellum
|
|
|
19
19
|
attr_reader :state
|
|
20
20
|
# @return [Array<Vellum::PromptOutput>]
|
|
21
21
|
attr_reader :outputs
|
|
22
|
+
# @return [Hash{String => Object}]
|
|
23
|
+
attr_reader :chat_message_metadata
|
|
22
24
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
23
25
|
attr_reader :additional_properties
|
|
24
26
|
# @return [Object]
|
|
@@ -33,16 +35,18 @@ module Vellum
|
|
|
33
35
|
# @param execution_id [String] The ID of the execution.
|
|
34
36
|
# @param state [String]
|
|
35
37
|
# @param outputs [Array<Vellum::PromptOutput>]
|
|
38
|
+
# @param chat_message_metadata [Hash{String => Object}]
|
|
36
39
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
37
40
|
# @return [Vellum::FulfilledExecutePromptResponse]
|
|
38
|
-
def initialize(meta: OMIT, raw: OMIT, execution_id:, state:, outputs:, additional_properties: nil)
|
|
41
|
+
def initialize(meta: OMIT, raw: OMIT, execution_id:, state:, outputs:, chat_message_metadata: OMIT, additional_properties: nil)
|
|
39
42
|
@meta = meta if meta != OMIT
|
|
40
43
|
@raw = raw if raw != OMIT
|
|
41
44
|
@execution_id = execution_id
|
|
42
45
|
@state = state
|
|
43
46
|
@outputs = outputs
|
|
47
|
+
@chat_message_metadata = chat_message_metadata if chat_message_metadata != OMIT
|
|
44
48
|
@additional_properties = additional_properties
|
|
45
|
-
@_field_set = { "meta": meta, "raw": raw, "execution_id": execution_id, "state": state, "outputs": outputs }.reject do | _k, v |
|
|
49
|
+
@_field_set = { "meta": meta, "raw": raw, "execution_id": execution_id, "state": state, "outputs": outputs, "chat_message_metadata": chat_message_metadata }.reject do | _k, v |
|
|
46
50
|
v == OMIT
|
|
47
51
|
end
|
|
48
52
|
end
|
|
@@ -66,12 +70,14 @@ end
|
|
|
66
70
|
item = item.to_json
|
|
67
71
|
Vellum::PromptOutput.from_json(json_object: item)
|
|
68
72
|
end
|
|
73
|
+
chat_message_metadata = parsed_json["chat_message_metadata"]
|
|
69
74
|
new(
|
|
70
75
|
meta: meta,
|
|
71
76
|
raw: raw,
|
|
72
77
|
execution_id: execution_id,
|
|
73
78
|
state: state,
|
|
74
79
|
outputs: outputs,
|
|
80
|
+
chat_message_metadata: chat_message_metadata,
|
|
75
81
|
additional_properties: struct
|
|
76
82
|
)
|
|
77
83
|
end
|
|
@@ -93,6 +99,7 @@ end
|
|
|
93
99
|
obj.execution_id.is_a?(String) != false || raise("Passed value for field obj.execution_id is not the expected type, validation failed.")
|
|
94
100
|
obj.state.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
|
|
95
101
|
obj.outputs.is_a?(Array) != false || raise("Passed value for field obj.outputs is not the expected type, validation failed.")
|
|
102
|
+
obj.chat_message_metadata&.is_a?(Hash) != false || raise("Passed value for field obj.chat_message_metadata is not the expected type, validation failed.")
|
|
96
103
|
end
|
|
97
104
|
end
|
|
98
105
|
end
|