cadenya 0.11.0 → 0.12.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/cadenya/models/objectives/objective_tool_call_data.rb +1 -9
  5. data/lib/cadenya/models/objectives/objective_tool_call_result.rb +27 -0
  6. data/lib/cadenya/models/objectives/objective_tool_call_result_audio_block.rb +46 -0
  7. data/lib/cadenya/models/objectives/objective_tool_call_result_content_block.rb +34 -0
  8. data/lib/cadenya/models/objectives/objective_tool_call_result_image_block.rb +46 -0
  9. data/lib/cadenya/models/objectives/objective_tool_call_result_text_block.rb +21 -0
  10. data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +102 -0
  11. data/lib/cadenya/models/objectives/tool_call_retrieve_params.rb +34 -0
  12. data/lib/cadenya/models/tool_result.rb +15 -7
  13. data/lib/cadenya/resources/objectives/tool_calls.rb +39 -0
  14. data/lib/cadenya/version.rb +1 -1
  15. data/lib/cadenya.rb +7 -0
  16. data/rbi/cadenya/models/objectives/objective_tool_call_data.rbi +0 -11
  17. data/rbi/cadenya/models/objectives/objective_tool_call_result.rbi +54 -0
  18. data/rbi/cadenya/models/objectives/objective_tool_call_result_audio_block.rbi +69 -0
  19. data/rbi/cadenya/models/objectives/objective_tool_call_result_content_block.rbi +90 -0
  20. data/rbi/cadenya/models/objectives/objective_tool_call_result_image_block.rbi +69 -0
  21. data/rbi/cadenya/models/objectives/objective_tool_call_result_text_block.rbi +31 -0
  22. data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +219 -0
  23. data/rbi/cadenya/models/objectives/tool_call_retrieve_params.rbi +58 -0
  24. data/rbi/cadenya/models/tool_result.rbi +34 -12
  25. data/rbi/cadenya/resources/objectives/tool_calls.rbi +20 -0
  26. data/sig/cadenya/models/objectives/objective_tool_call_data.rbs +0 -7
  27. data/sig/cadenya/models/objectives/objective_tool_call_result.rbs +24 -0
  28. data/sig/cadenya/models/objectives/objective_tool_call_result_audio_block.rbs +34 -0
  29. data/sig/cadenya/models/objectives/objective_tool_call_result_content_block.rbs +46 -0
  30. data/sig/cadenya/models/objectives/objective_tool_call_result_image_block.rbs +34 -0
  31. data/sig/cadenya/models/objectives/objective_tool_call_result_text_block.rbs +17 -0
  32. data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +91 -0
  33. data/sig/cadenya/models/objectives/tool_call_retrieve_params.rbs +34 -0
  34. data/sig/cadenya/models/tool_result.rbs +15 -9
  35. data/sig/cadenya/resources/objectives/tool_calls.rbs +7 -0
  36. metadata +22 -1
@@ -0,0 +1,90 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultContentBlock =
6
+ Objectives::ObjectiveToolCallResultContentBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultContentBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultContentBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig do
19
+ returns(
20
+ T.nilable(Cadenya::Objectives::ObjectiveToolCallResultAudioBlock)
21
+ )
22
+ end
23
+ attr_reader :audio
24
+
25
+ sig do
26
+ params(
27
+ audio:
28
+ Cadenya::Objectives::ObjectiveToolCallResultAudioBlock::OrHash
29
+ ).void
30
+ end
31
+ attr_writer :audio
32
+
33
+ sig do
34
+ returns(
35
+ T.nilable(Cadenya::Objectives::ObjectiveToolCallResultImageBlock)
36
+ )
37
+ end
38
+ attr_reader :image
39
+
40
+ sig do
41
+ params(
42
+ image:
43
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock::OrHash
44
+ ).void
45
+ end
46
+ attr_writer :image
47
+
48
+ sig do
49
+ returns(
50
+ T.nilable(Cadenya::Objectives::ObjectiveToolCallResultTextBlock)
51
+ )
52
+ end
53
+ attr_reader :text
54
+
55
+ sig do
56
+ params(
57
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock::OrHash
58
+ ).void
59
+ end
60
+ attr_writer :text
61
+
62
+ # ContentBlock is a single block of tool result content. Exactly one of the
63
+ # variants is set.
64
+ sig do
65
+ params(
66
+ audio:
67
+ Cadenya::Objectives::ObjectiveToolCallResultAudioBlock::OrHash,
68
+ image:
69
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock::OrHash,
70
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock::OrHash
71
+ ).returns(T.attached_class)
72
+ end
73
+ def self.new(audio: nil, image: nil, text: nil)
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
80
+ image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
81
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,69 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultImageBlock =
6
+ Objectives::ObjectiveToolCallResultImageBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultImageBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # When the signed URL expires.
19
+ sig { returns(Time) }
20
+ attr_accessor :expires_at
21
+
22
+ # IANA media type of the stored image, e.g. image/png.
23
+ sig { returns(String) }
24
+ attr_accessor :mime_type
25
+
26
+ # Size of the stored image in bytes.
27
+ sig { returns(String) }
28
+ attr_accessor :size_bytes
29
+
30
+ # Short-lived signed URL to download the stored image.
31
+ sig { returns(String) }
32
+ attr_accessor :url
33
+
34
+ sig do
35
+ params(
36
+ expires_at: Time,
37
+ mime_type: String,
38
+ size_bytes: String,
39
+ url: String
40
+ ).returns(T.attached_class)
41
+ end
42
+ def self.new(
43
+ # When the signed URL expires.
44
+ expires_at:,
45
+ # IANA media type of the stored image, e.g. image/png.
46
+ mime_type:,
47
+ # Size of the stored image in bytes.
48
+ size_bytes:,
49
+ # Short-lived signed URL to download the stored image.
50
+ url:
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ expires_at: Time,
58
+ mime_type: String,
59
+ size_bytes: String,
60
+ url: String
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultTextBlock =
6
+ Objectives::ObjectiveToolCallResultTextBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultTextBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultTextBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :text
20
+
21
+ sig { params(text: String).returns(T.attached_class) }
22
+ def self.new(text:)
23
+ end
24
+
25
+ sig { override.returns({ text: String }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,219 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallWithResult = Objectives::ObjectiveToolCallWithResult
6
+
7
+ module Objectives
8
+ class ObjectiveToolCallWithResult < Cadenya::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Cadenya::Objectives::ObjectiveToolCallWithResult,
13
+ Cadenya::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Cadenya::Objectives::ObjectiveToolCallData) }
18
+ attr_reader :data
19
+
20
+ sig do
21
+ params(data: Cadenya::Objectives::ObjectiveToolCallData::OrHash).void
22
+ end
23
+ attr_writer :data
24
+
25
+ sig { returns(Cadenya::Objectives::ObjectiveToolCallInfo) }
26
+ attr_reader :info
27
+
28
+ sig do
29
+ params(info: Cadenya::Objectives::ObjectiveToolCallInfo::OrHash).void
30
+ end
31
+ attr_writer :info
32
+
33
+ # Metadata for ephemeral operations and activities (e.g., objectives, executions,
34
+ # runs)
35
+ sig { returns(Cadenya::OperationMetadata) }
36
+ attr_reader :metadata
37
+
38
+ sig { params(metadata: Cadenya::OperationMetadata::OrHash).void }
39
+ attr_writer :metadata
40
+
41
+ # Current status of the tool call
42
+ sig do
43
+ returns(
44
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
45
+ )
46
+ end
47
+ attr_accessor :status
48
+
49
+ sig do
50
+ returns(
51
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
52
+ )
53
+ end
54
+ attr_accessor :execution_status
55
+
56
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
57
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
58
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
59
+ # rather than inline bytes.
60
+ sig { returns(T.nilable(Cadenya::Objectives::ObjectiveToolCallResult)) }
61
+ attr_reader :result
62
+
63
+ sig do
64
+ params(
65
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash
66
+ ).void
67
+ end
68
+ attr_writer :result
69
+
70
+ # ObjectiveToolCallWithResult is an ObjectiveToolCall plus the content the tool
71
+ # returned. Returned by GetObjectiveToolCall.
72
+ sig do
73
+ params(
74
+ data: Cadenya::Objectives::ObjectiveToolCallData::OrHash,
75
+ execution_status:
76
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::OrSymbol,
77
+ info: Cadenya::Objectives::ObjectiveToolCallInfo::OrHash,
78
+ metadata: Cadenya::OperationMetadata::OrHash,
79
+ status:
80
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::OrSymbol,
81
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash
82
+ ).returns(T.attached_class)
83
+ end
84
+ def self.new(
85
+ data:,
86
+ execution_status:,
87
+ info:,
88
+ # Metadata for ephemeral operations and activities (e.g., objectives, executions,
89
+ # runs)
90
+ metadata:,
91
+ # Current status of the tool call
92
+ status:,
93
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
94
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
95
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
96
+ # rather than inline bytes.
97
+ result: nil
98
+ )
99
+ end
100
+
101
+ sig do
102
+ override.returns(
103
+ {
104
+ data: Cadenya::Objectives::ObjectiveToolCallData,
105
+ execution_status:
106
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol,
107
+ info: Cadenya::Objectives::ObjectiveToolCallInfo,
108
+ metadata: Cadenya::OperationMetadata,
109
+ status:
110
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol,
111
+ result: Cadenya::Objectives::ObjectiveToolCallResult
112
+ }
113
+ )
114
+ end
115
+ def to_hash
116
+ end
117
+
118
+ module ExecutionStatus
119
+ extend Cadenya::Internal::Type::Enum
120
+
121
+ TaggedSymbol =
122
+ T.type_alias do
123
+ T.all(
124
+ Symbol,
125
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus
126
+ )
127
+ end
128
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
129
+
130
+ TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED =
131
+ T.let(
132
+ :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED,
133
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
134
+ )
135
+ TOOL_CALL_EXECUTION_STATUS_PENDING =
136
+ T.let(
137
+ :TOOL_CALL_EXECUTION_STATUS_PENDING,
138
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
139
+ )
140
+ TOOL_CALL_EXECUTION_STATUS_RUNNING =
141
+ T.let(
142
+ :TOOL_CALL_EXECUTION_STATUS_RUNNING,
143
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
144
+ )
145
+ TOOL_CALL_EXECUTION_STATUS_COMPLETED =
146
+ T.let(
147
+ :TOOL_CALL_EXECUTION_STATUS_COMPLETED,
148
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
149
+ )
150
+ TOOL_CALL_EXECUTION_STATUS_ERRORED =
151
+ T.let(
152
+ :TOOL_CALL_EXECUTION_STATUS_ERRORED,
153
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
154
+ )
155
+
156
+ sig do
157
+ override.returns(
158
+ T::Array[
159
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
160
+ ]
161
+ )
162
+ end
163
+ def self.values
164
+ end
165
+ end
166
+
167
+ # Current status of the tool call
168
+ module Status
169
+ extend Cadenya::Internal::Type::Enum
170
+
171
+ TaggedSymbol =
172
+ T.type_alias do
173
+ T.all(
174
+ Symbol,
175
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status
176
+ )
177
+ end
178
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
179
+
180
+ TOOL_CALL_STATUS_UNSPECIFIED =
181
+ T.let(
182
+ :TOOL_CALL_STATUS_UNSPECIFIED,
183
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
184
+ )
185
+ TOOL_CALL_STATUS_AUTO_APPROVED =
186
+ T.let(
187
+ :TOOL_CALL_STATUS_AUTO_APPROVED,
188
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
189
+ )
190
+ TOOL_CALL_STATUS_WAITING_FOR_APPROVAL =
191
+ T.let(
192
+ :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL,
193
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
194
+ )
195
+ TOOL_CALL_STATUS_APPROVED =
196
+ T.let(
197
+ :TOOL_CALL_STATUS_APPROVED,
198
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
199
+ )
200
+ TOOL_CALL_STATUS_DENIED =
201
+ T.let(
202
+ :TOOL_CALL_STATUS_DENIED,
203
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
204
+ )
205
+
206
+ sig do
207
+ override.returns(
208
+ T::Array[
209
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
210
+ ]
211
+ )
212
+ end
213
+ def self.values
214
+ end
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Objectives
6
+ class ToolCallRetrieveParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ToolCallRetrieveParams,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :workspace_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :objective_id
23
+
24
+ sig { returns(String) }
25
+ attr_accessor :tool_call_id
26
+
27
+ sig do
28
+ params(
29
+ workspace_id: String,
30
+ objective_id: String,
31
+ tool_call_id: String,
32
+ request_options: Cadenya::RequestOptions::OrHash
33
+ ).returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+ workspace_id:,
37
+ objective_id:,
38
+ tool_call_id:,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ sig do
44
+ override.returns(
45
+ {
46
+ workspace_id: String,
47
+ objective_id: String,
48
+ tool_call_id: String,
49
+ request_options: Cadenya::RequestOptions
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -6,25 +6,47 @@ module Cadenya
6
6
  OrHash =
7
7
  T.type_alias { T.any(Cadenya::ToolResult, Cadenya::Internal::AnyHash) }
8
8
 
9
- sig { returns(T.nilable(String)) }
10
- attr_reader :content
9
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
10
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
11
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
12
+ # rather than inline bytes.
13
+ sig { returns(Cadenya::Objectives::ObjectiveToolCallResult) }
14
+ attr_reader :result
11
15
 
12
- sig { params(content: String).void }
13
- attr_writer :content
14
-
15
- sig { returns(T.nilable(String)) }
16
- attr_reader :tool_call_id
16
+ sig do
17
+ params(
18
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash
19
+ ).void
20
+ end
21
+ attr_writer :result
17
22
 
18
- sig { params(tool_call_id: String).void }
19
- attr_writer :tool_call_id
23
+ sig { returns(String) }
24
+ attr_accessor :tool_call_id
20
25
 
21
26
  sig do
22
- params(content: String, tool_call_id: String).returns(T.attached_class)
27
+ params(
28
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash,
29
+ tool_call_id: String
30
+ ).returns(T.attached_class)
23
31
  end
24
- def self.new(content: nil, tool_call_id: nil)
32
+ def self.new(
33
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
34
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
35
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
36
+ # rather than inline bytes.
37
+ result:,
38
+ tool_call_id:
39
+ )
25
40
  end
26
41
 
27
- sig { override.returns({ content: String, tool_call_id: String }) }
42
+ sig do
43
+ override.returns(
44
+ {
45
+ result: Cadenya::Objectives::ObjectiveToolCallResult,
46
+ tool_call_id: String
47
+ }
48
+ )
49
+ end
28
50
  def to_hash
29
51
  end
30
52
  end
@@ -4,6 +4,26 @@ module Cadenya
4
4
  module Resources
5
5
  class Objectives
6
6
  class ToolCalls
7
+ # Retrieves a single tool call, including the content the tool returned. Media
8
+ # content (images, audio) is served as short-lived signed URLs.
9
+ sig do
10
+ params(
11
+ tool_call_id: String,
12
+ workspace_id: String,
13
+ objective_id: String,
14
+ request_options: Cadenya::RequestOptions::OrHash
15
+ ).returns(Cadenya::Objectives::ObjectiveToolCallWithResult)
16
+ end
17
+ def retrieve(
18
+ # The ID of the tool call to retrieve
19
+ tool_call_id,
20
+ workspace_id:,
21
+ # The ID of the objective. Supports "external_id:" prefix for external IDs.
22
+ objective_id:,
23
+ request_options: {}
24
+ )
25
+ end
26
+
7
27
  # Lists all tool calls for an objective
8
28
  sig do
9
29
  params(
@@ -8,7 +8,6 @@ module Cadenya
8
8
  callable: Cadenya::CallableTool,
9
9
  arguments: ::Hash[Symbol, top],
10
10
  memo: String,
11
- result: String,
12
11
  status_changed_by: Cadenya::Profile
13
12
  }
14
13
 
@@ -23,10 +22,6 @@ module Cadenya
23
22
 
24
23
  def memo=: (String) -> String
25
24
 
26
- attr_reader result: String?
27
-
28
- def result=: (String) -> String
29
-
30
25
  attr_reader status_changed_by: Cadenya::Profile?
31
26
 
32
27
  def status_changed_by=: (Cadenya::Profile) -> Cadenya::Profile
@@ -35,7 +30,6 @@ module Cadenya
35
30
  callable: Cadenya::CallableTool,
36
31
  ?arguments: ::Hash[Symbol, top],
37
32
  ?memo: String,
38
- ?result: String,
39
33
  ?status_changed_by: Cadenya::Profile
40
34
  ) -> void
41
35
 
@@ -43,7 +37,6 @@ module Cadenya
43
37
  callable: Cadenya::CallableTool,
44
38
  arguments: ::Hash[Symbol, top],
45
39
  memo: String,
46
- result: String,
47
40
  status_changed_by: Cadenya::Profile
48
41
  }
49
42
  end
@@ -0,0 +1,24 @@
1
+ module Cadenya
2
+ module Models
3
+ class ObjectiveToolCallResult = Objectives::ObjectiveToolCallResult
4
+
5
+ module Objectives
6
+ type objective_tool_call_result =
7
+ {
8
+ content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
9
+ }
10
+
11
+ class ObjectiveToolCallResult < Cadenya::Internal::Type::BaseModel
12
+ attr_accessor content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
13
+
14
+ def initialize: (
15
+ content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
20
+ }
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,34 @@
1
+ module Cadenya
2
+ module Models
3
+ class ObjectiveToolCallResultAudioBlock = Objectives::ObjectiveToolCallResultAudioBlock
4
+
5
+ module Objectives
6
+ type objective_tool_call_result_audio_block =
7
+ { expires_at: Time, mime_type: String, size_bytes: String, url: String }
8
+
9
+ class ObjectiveToolCallResultAudioBlock < Cadenya::Internal::Type::BaseModel
10
+ attr_accessor expires_at: Time
11
+
12
+ attr_accessor mime_type: String
13
+
14
+ attr_accessor size_bytes: String
15
+
16
+ attr_accessor url: String
17
+
18
+ def initialize: (
19
+ expires_at: Time,
20
+ mime_type: String,
21
+ size_bytes: String,
22
+ url: String
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ expires_at: Time,
27
+ mime_type: String,
28
+ size_bytes: String,
29
+ url: String
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,46 @@
1
+ module Cadenya
2
+ module Models
3
+ class ObjectiveToolCallResultContentBlock = Objectives::ObjectiveToolCallResultContentBlock
4
+
5
+ module Objectives
6
+ type objective_tool_call_result_content_block =
7
+ {
8
+ audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
9
+ image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
10
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
11
+ }
12
+
13
+ class ObjectiveToolCallResultContentBlock < Cadenya::Internal::Type::BaseModel
14
+ attr_reader audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock?
15
+
16
+ def audio=: (
17
+ Cadenya::Objectives::ObjectiveToolCallResultAudioBlock
18
+ ) -> Cadenya::Objectives::ObjectiveToolCallResultAudioBlock
19
+
20
+ attr_reader image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock?
21
+
22
+ def image=: (
23
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock
24
+ ) -> Cadenya::Objectives::ObjectiveToolCallResultImageBlock
25
+
26
+ attr_reader text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock?
27
+
28
+ def text=: (
29
+ Cadenya::Objectives::ObjectiveToolCallResultTextBlock
30
+ ) -> Cadenya::Objectives::ObjectiveToolCallResultTextBlock
31
+
32
+ def initialize: (
33
+ ?audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
34
+ ?image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
35
+ ?text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
36
+ ) -> void
37
+
38
+ def to_hash: -> {
39
+ audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
40
+ image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
41
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end