handinger 0.5.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecd40670a310e06ad0f0b33baa0f620b434bb11398f45a9e44e9c536533441bd
4
- data.tar.gz: 18bf80c24a1126bb839e73146ec8d5aab5c62aba54fbdf8d56f32a0fb3c97ec1
3
+ metadata.gz: 03e43a5f9df9dc47be5da0cb54df3bbd3a9caa7b0f32e35981f4375b443774e4
4
+ data.tar.gz: 105454fa3a99cc7b62cf7241dd8dfaf72190f01f5208f171da41265cd577f8e3
5
5
  SHA512:
6
- metadata.gz: 7520dd4bf1e744831db561b4bc1af8ac9aea2c767f5f477e81604a6d7b1a4a45fc70328bf569832e774eed201bf7bff0ea0c6a80c015f6fea1130caeb6367b91
7
- data.tar.gz: 40b7e0965ddc840e39988a2d3659d31d3a47074770054149e4c31534ddbee84162eb16ab61ae0831b8dba59b6bd312691223526e06c0dae9a8ff269fef63465f
6
+ metadata.gz: 8ac4f97f05e1380cffc03eccbbd7343e6cbe10d6d5c23a491f5e36a4e76c58febb0db9dbed58d627cfba60062feda20df24214fe87883f9ae10f968ac5fc65c4
7
+ data.tar.gz: 8b9fa07b57feebd1066bac295f738ab3bf66a239c68b6a988e895212774c5dda056fbb4a1dde66ff94d01c182a02cfd4a2da73c983d29a73665b75c06e675143
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 (2026-05-11)
4
+
5
+ Full Changelog: [v0.5.0...v0.6.0](https://github.com/Ramensoft/handinger-ruby/compare/v0.5.0...v0.6.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([7c72012](https://github.com/Ramensoft/handinger-ruby/commit/7c72012ce98e7d806881133cff1c1625a1bfcdac))
10
+
3
11
  ## 0.5.0 (2026-05-11)
4
12
 
5
13
  Full Changelog: [v0.4.0...v0.5.0](https://github.com/Ramensoft/handinger-ruby/compare/v0.4.0...v0.5.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "handinger", "~> 0.5.0"
20
+ gem "handinger", "~> 0.6.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -41,8 +41,8 @@ module Handinger
41
41
 
42
42
  # @!attribute object
43
43
  #
44
- # @return [Symbol, Handinger::Models::Worker::Object]
45
- required :object, enum: -> { Handinger::Worker::Object }
44
+ # @return [Symbol, :worker]
45
+ required :object, const: :worker
46
46
 
47
47
  # @!attribute output
48
48
  #
@@ -87,7 +87,7 @@ module Handinger
87
87
  # @return [Handinger::Models::Worker::Usage, nil]
88
88
  optional :usage, -> { Handinger::Worker::Usage }
89
89
 
90
- # @!method initialize(id:, created_at:, error:, files:, incomplete_details:, messages:, metadata:, object:, output:, output_text:, running:, sources:, status:, structured_output:, url:, usage: nil)
90
+ # @!method initialize(id:, created_at:, error:, files:, incomplete_details:, messages:, metadata:, output:, output_text:, running:, sources:, status:, structured_output:, url:, usage: nil, object: :worker)
91
91
  # @param id [String]
92
92
  #
93
93
  # @param created_at [Integer, nil]
@@ -102,8 +102,6 @@ module Handinger
102
102
  #
103
103
  # @param metadata [Hash{Symbol=>Object}]
104
104
  #
105
- # @param object [Symbol, Handinger::Models::Worker::Object]
106
- #
107
105
  # @param output [Array<Handinger::Models::Worker::Output>]
108
106
  #
109
107
  # @param output_text [String]
@@ -119,6 +117,8 @@ module Handinger
119
117
  # @param url [String] Web URL of the worker in the Handinger dashboard.
120
118
  #
121
119
  # @param usage [Handinger::Models::Worker::Usage]
120
+ #
121
+ # @param object [Symbol, :worker]
122
122
 
123
123
  class File < Handinger::Internal::Type::BaseModel
124
124
  # @!attribute filename
@@ -142,16 +142,6 @@ module Handinger
142
142
  # @param url [String]
143
143
  end
144
144
 
145
- # @see Handinger::Models::Worker#object
146
- module Object
147
- extend Handinger::Internal::Type::Enum
148
-
149
- WORKER = :worker
150
-
151
- # @!method self.values
152
- # @return [Array<Symbol>]
153
- end
154
-
155
145
  class Output < Handinger::Internal::Type::BaseModel
156
146
  # @!attribute id
157
147
  #
@@ -165,25 +155,25 @@ module Handinger
165
155
 
166
156
  # @!attribute role
167
157
  #
168
- # @return [Symbol, Handinger::Models::Worker::Output::Role]
169
- required :role, enum: -> { Handinger::Worker::Output::Role }
158
+ # @return [Symbol, :assistant]
159
+ required :role, const: :assistant
170
160
 
171
161
  # @!attribute status
172
162
  #
173
- # @return [Symbol, Handinger::Models::Worker::Output::Status]
174
- required :status, enum: -> { Handinger::Worker::Output::Status }
163
+ # @return [Symbol, :completed]
164
+ required :status, const: :completed
175
165
 
176
166
  # @!attribute type
177
167
  #
178
- # @return [Symbol, Handinger::Models::Worker::Output::Type]
179
- required :type, enum: -> { Handinger::Worker::Output::Type }
168
+ # @return [Symbol, :message]
169
+ required :type, const: :message
180
170
 
181
- # @!method initialize(id:, content:, role:, status:, type:)
171
+ # @!method initialize(id:, content:, role: :assistant, status: :completed, type: :message)
182
172
  # @param id [String]
183
173
  # @param content [Array<Handinger::Models::Worker::Output::Content>]
184
- # @param role [Symbol, Handinger::Models::Worker::Output::Role]
185
- # @param status [Symbol, Handinger::Models::Worker::Output::Status]
186
- # @param type [Symbol, Handinger::Models::Worker::Output::Type]
174
+ # @param role [Symbol, :assistant]
175
+ # @param status [Symbol, :completed]
176
+ # @param type [Symbol, :message]
187
177
 
188
178
  class Content < Handinger::Internal::Type::BaseModel
189
179
  # @!attribute text
@@ -193,52 +183,12 @@ module Handinger
193
183
 
194
184
  # @!attribute type
195
185
  #
196
- # @return [Symbol, Handinger::Models::Worker::Output::Content::Type]
197
- required :type, enum: -> { Handinger::Worker::Output::Content::Type }
186
+ # @return [Symbol, :output_text]
187
+ required :type, const: :output_text
198
188
 
199
- # @!method initialize(text:, type:)
189
+ # @!method initialize(text:, type: :output_text)
200
190
  # @param text [String]
201
- # @param type [Symbol, Handinger::Models::Worker::Output::Content::Type]
202
-
203
- # @see Handinger::Models::Worker::Output::Content#type
204
- module Type
205
- extend Handinger::Internal::Type::Enum
206
-
207
- OUTPUT_TEXT = :output_text
208
-
209
- # @!method self.values
210
- # @return [Array<Symbol>]
211
- end
212
- end
213
-
214
- # @see Handinger::Models::Worker::Output#role
215
- module Role
216
- extend Handinger::Internal::Type::Enum
217
-
218
- ASSISTANT = :assistant
219
-
220
- # @!method self.values
221
- # @return [Array<Symbol>]
222
- end
223
-
224
- # @see Handinger::Models::Worker::Output#status
225
- module Status
226
- extend Handinger::Internal::Type::Enum
227
-
228
- COMPLETED = :completed
229
-
230
- # @!method self.values
231
- # @return [Array<Symbol>]
232
- end
233
-
234
- # @see Handinger::Models::Worker::Output#type
235
- module Type
236
- extend Handinger::Internal::Type::Enum
237
-
238
- MESSAGE = :message
239
-
240
- # @!method self.values
241
- # @return [Array<Symbol>]
191
+ # @param type [Symbol, :output_text]
242
192
  end
243
193
  end
244
194
 
@@ -255,29 +205,19 @@ module Handinger
255
205
 
256
206
  # @!attribute type
257
207
  #
258
- # @return [Symbol, Handinger::Models::Worker::Source::Type]
259
- required :type, enum: -> { Handinger::Worker::Source::Type }
208
+ # @return [Symbol, :url]
209
+ required :type, const: :url
260
210
 
261
211
  # @!attribute url
262
212
  #
263
213
  # @return [String]
264
214
  required :url, String
265
215
 
266
- # @!method initialize(id:, title:, type:, url:)
216
+ # @!method initialize(id:, title:, url:, type: :url)
267
217
  # @param id [String]
268
218
  # @param title [String, nil]
269
- # @param type [Symbol, Handinger::Models::Worker::Source::Type]
270
219
  # @param url [String]
271
-
272
- # @see Handinger::Models::Worker::Source#type
273
- module Type
274
- extend Handinger::Internal::Type::Enum
275
-
276
- URL = :url
277
-
278
- # @!method self.values
279
- # @return [Array<Symbol>]
280
- end
220
+ # @param type [Symbol, :url]
281
221
  end
282
222
 
283
223
  # @see Handinger::Models::Worker#status
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Handinger
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
@@ -27,7 +27,7 @@ module Handinger
27
27
  sig { returns(T::Hash[Symbol, T.anything]) }
28
28
  attr_accessor :metadata
29
29
 
30
- sig { returns(Handinger::Worker::Object::TaggedSymbol) }
30
+ sig { returns(Symbol) }
31
31
  attr_accessor :object
32
32
 
33
33
  sig { returns(T::Array[Handinger::Worker::Output]) }
@@ -67,7 +67,6 @@ module Handinger
67
67
  incomplete_details: NilClass,
68
68
  messages: T::Array[T.anything],
69
69
  metadata: T::Hash[Symbol, T.anything],
70
- object: Handinger::Worker::Object::OrSymbol,
71
70
  output: T::Array[Handinger::Worker::Output::OrHash],
72
71
  output_text: String,
73
72
  running: T::Boolean,
@@ -75,7 +74,8 @@ module Handinger
75
74
  status: Handinger::Worker::Status::OrSymbol,
76
75
  structured_output: T.nilable(T::Hash[Symbol, T.anything]),
77
76
  url: String,
78
- usage: Handinger::Worker::Usage::OrHash
77
+ usage: Handinger::Worker::Usage::OrHash,
78
+ object: Symbol
79
79
  ).returns(T.attached_class)
80
80
  end
81
81
  def self.new(
@@ -86,7 +86,6 @@ module Handinger
86
86
  incomplete_details:,
87
87
  messages:,
88
88
  metadata:,
89
- object:,
90
89
  output:,
91
90
  output_text:,
92
91
  running:,
@@ -95,7 +94,8 @@ module Handinger
95
94
  structured_output:,
96
95
  # Web URL of the worker in the Handinger dashboard.
97
96
  url:,
98
- usage: nil
97
+ usage: nil,
98
+ object: :worker
99
99
  )
100
100
  end
101
101
 
@@ -109,7 +109,7 @@ module Handinger
109
109
  incomplete_details: NilClass,
110
110
  messages: T::Array[T.anything],
111
111
  metadata: T::Hash[Symbol, T.anything],
112
- object: Handinger::Worker::Object::TaggedSymbol,
112
+ object: Symbol,
113
113
  output: T::Array[Handinger::Worker::Output],
114
114
  output_text: String,
115
115
  running: T::Boolean,
@@ -158,21 +158,6 @@ module Handinger
158
158
  end
159
159
  end
160
160
 
161
- module Object
162
- extend Handinger::Internal::Type::Enum
163
-
164
- TaggedSymbol = T.type_alias { T.all(Symbol, Handinger::Worker::Object) }
165
- OrSymbol = T.type_alias { T.any(Symbol, String) }
166
-
167
- WORKER = T.let(:worker, Handinger::Worker::Object::TaggedSymbol)
168
-
169
- sig do
170
- override.returns(T::Array[Handinger::Worker::Object::TaggedSymbol])
171
- end
172
- def self.values
173
- end
174
- end
175
-
176
161
  class Output < Handinger::Internal::Type::BaseModel
177
162
  OrHash =
178
163
  T.type_alias do
@@ -185,25 +170,31 @@ module Handinger
185
170
  sig { returns(T::Array[Handinger::Worker::Output::Content]) }
186
171
  attr_accessor :content
187
172
 
188
- sig { returns(Handinger::Worker::Output::Role::TaggedSymbol) }
173
+ sig { returns(Symbol) }
189
174
  attr_accessor :role
190
175
 
191
- sig { returns(Handinger::Worker::Output::Status::TaggedSymbol) }
176
+ sig { returns(Symbol) }
192
177
  attr_accessor :status
193
178
 
194
- sig { returns(Handinger::Worker::Output::Type::TaggedSymbol) }
179
+ sig { returns(Symbol) }
195
180
  attr_accessor :type
196
181
 
197
182
  sig do
198
183
  params(
199
184
  id: String,
200
185
  content: T::Array[Handinger::Worker::Output::Content::OrHash],
201
- role: Handinger::Worker::Output::Role::OrSymbol,
202
- status: Handinger::Worker::Output::Status::OrSymbol,
203
- type: Handinger::Worker::Output::Type::OrSymbol
186
+ role: Symbol,
187
+ status: Symbol,
188
+ type: Symbol
204
189
  ).returns(T.attached_class)
205
190
  end
206
- def self.new(id:, content:, role:, status:, type:)
191
+ def self.new(
192
+ id:,
193
+ content:,
194
+ role: :assistant,
195
+ status: :completed,
196
+ type: :message
197
+ )
207
198
  end
208
199
 
209
200
  sig do
@@ -211,9 +202,9 @@ module Handinger
211
202
  {
212
203
  id: String,
213
204
  content: T::Array[Handinger::Worker::Output::Content],
214
- role: Handinger::Worker::Output::Role::TaggedSymbol,
215
- status: Handinger::Worker::Output::Status::TaggedSymbol,
216
- type: Handinger::Worker::Output::Type::TaggedSymbol
205
+ role: Symbol,
206
+ status: Symbol,
207
+ type: Symbol
217
208
  }
218
209
  )
219
210
  end
@@ -232,111 +223,16 @@ module Handinger
232
223
  sig { returns(String) }
233
224
  attr_accessor :text
234
225
 
235
- sig do
236
- returns(Handinger::Worker::Output::Content::Type::TaggedSymbol)
237
- end
226
+ sig { returns(Symbol) }
238
227
  attr_accessor :type
239
228
 
240
- sig do
241
- params(
242
- text: String,
243
- type: Handinger::Worker::Output::Content::Type::OrSymbol
244
- ).returns(T.attached_class)
245
- end
246
- def self.new(text:, type:)
229
+ sig { params(text: String, type: Symbol).returns(T.attached_class) }
230
+ def self.new(text:, type: :output_text)
247
231
  end
248
232
 
249
- sig do
250
- override.returns(
251
- {
252
- text: String,
253
- type: Handinger::Worker::Output::Content::Type::TaggedSymbol
254
- }
255
- )
256
- end
233
+ sig { override.returns({ text: String, type: Symbol }) }
257
234
  def to_hash
258
235
  end
259
-
260
- module Type
261
- extend Handinger::Internal::Type::Enum
262
-
263
- TaggedSymbol =
264
- T.type_alias do
265
- T.all(Symbol, Handinger::Worker::Output::Content::Type)
266
- end
267
- OrSymbol = T.type_alias { T.any(Symbol, String) }
268
-
269
- OUTPUT_TEXT =
270
- T.let(
271
- :output_text,
272
- Handinger::Worker::Output::Content::Type::TaggedSymbol
273
- )
274
-
275
- sig do
276
- override.returns(
277
- T::Array[Handinger::Worker::Output::Content::Type::TaggedSymbol]
278
- )
279
- end
280
- def self.values
281
- end
282
- end
283
- end
284
-
285
- module Role
286
- extend Handinger::Internal::Type::Enum
287
-
288
- TaggedSymbol =
289
- T.type_alias { T.all(Symbol, Handinger::Worker::Output::Role) }
290
- OrSymbol = T.type_alias { T.any(Symbol, String) }
291
-
292
- ASSISTANT =
293
- T.let(:assistant, Handinger::Worker::Output::Role::TaggedSymbol)
294
-
295
- sig do
296
- override.returns(
297
- T::Array[Handinger::Worker::Output::Role::TaggedSymbol]
298
- )
299
- end
300
- def self.values
301
- end
302
- end
303
-
304
- module Status
305
- extend Handinger::Internal::Type::Enum
306
-
307
- TaggedSymbol =
308
- T.type_alias { T.all(Symbol, Handinger::Worker::Output::Status) }
309
- OrSymbol = T.type_alias { T.any(Symbol, String) }
310
-
311
- COMPLETED =
312
- T.let(:completed, Handinger::Worker::Output::Status::TaggedSymbol)
313
-
314
- sig do
315
- override.returns(
316
- T::Array[Handinger::Worker::Output::Status::TaggedSymbol]
317
- )
318
- end
319
- def self.values
320
- end
321
- end
322
-
323
- module Type
324
- extend Handinger::Internal::Type::Enum
325
-
326
- TaggedSymbol =
327
- T.type_alias { T.all(Symbol, Handinger::Worker::Output::Type) }
328
- OrSymbol = T.type_alias { T.any(Symbol, String) }
329
-
330
- MESSAGE =
331
- T.let(:message, Handinger::Worker::Output::Type::TaggedSymbol)
332
-
333
- sig do
334
- override.returns(
335
- T::Array[Handinger::Worker::Output::Type::TaggedSymbol]
336
- )
337
- end
338
- def self.values
339
- end
340
236
  end
341
237
  end
342
238
 
@@ -352,7 +248,7 @@ module Handinger
352
248
  sig { returns(T.nilable(String)) }
353
249
  attr_accessor :title
354
250
 
355
- sig { returns(Handinger::Worker::Source::Type::TaggedSymbol) }
251
+ sig { returns(Symbol) }
356
252
  attr_accessor :type
357
253
 
358
254
  sig { returns(String) }
@@ -362,43 +258,20 @@ module Handinger
362
258
  params(
363
259
  id: String,
364
260
  title: T.nilable(String),
365
- type: Handinger::Worker::Source::Type::OrSymbol,
366
- url: String
261
+ url: String,
262
+ type: Symbol
367
263
  ).returns(T.attached_class)
368
264
  end
369
- def self.new(id:, title:, type:, url:)
265
+ def self.new(id:, title:, url:, type: :url)
370
266
  end
371
267
 
372
268
  sig do
373
269
  override.returns(
374
- {
375
- id: String,
376
- title: T.nilable(String),
377
- type: Handinger::Worker::Source::Type::TaggedSymbol,
378
- url: String
379
- }
270
+ { id: String, title: T.nilable(String), type: Symbol, url: String }
380
271
  )
381
272
  end
382
273
  def to_hash
383
274
  end
384
-
385
- module Type
386
- extend Handinger::Internal::Type::Enum
387
-
388
- TaggedSymbol =
389
- T.type_alias { T.all(Symbol, Handinger::Worker::Source::Type) }
390
- OrSymbol = T.type_alias { T.any(Symbol, String) }
391
-
392
- URL = T.let(:url, Handinger::Worker::Source::Type::TaggedSymbol)
393
-
394
- sig do
395
- override.returns(
396
- T::Array[Handinger::Worker::Source::Type::TaggedSymbol]
397
- )
398
- end
399
- def self.values
400
- end
401
- end
402
275
  end
403
276
 
404
277
  module Status
@@ -9,7 +9,7 @@ module Handinger
9
9
  incomplete_details: nil,
10
10
  messages: ::Array[top],
11
11
  metadata: ::Hash[Symbol, top],
12
- object: Handinger::Models::Worker::object,
12
+ object: :worker,
13
13
  output: ::Array[Handinger::Worker::Output],
14
14
  output_text: String,
15
15
  running: bool,
@@ -35,7 +35,7 @@ module Handinger
35
35
 
36
36
  attr_accessor metadata: ::Hash[Symbol, top]
37
37
 
38
- attr_accessor object: Handinger::Models::Worker::object
38
+ attr_accessor object: :worker
39
39
 
40
40
  attr_accessor output: ::Array[Handinger::Worker::Output]
41
41
 
@@ -63,7 +63,6 @@ module Handinger
63
63
  incomplete_details: nil,
64
64
  messages: ::Array[top],
65
65
  metadata: ::Hash[Symbol, top],
66
- object: Handinger::Models::Worker::object,
67
66
  output: ::Array[Handinger::Worker::Output],
68
67
  output_text: String,
69
68
  running: bool,
@@ -71,7 +70,8 @@ module Handinger
71
70
  status: Handinger::Models::Worker::status,
72
71
  structured_output: ::Hash[Symbol, top]?,
73
72
  url: String,
74
- ?usage: Handinger::Worker::Usage
73
+ ?usage: Handinger::Worker::Usage,
74
+ ?object: :worker
75
75
  ) -> void
76
76
 
77
77
  def to_hash: -> {
@@ -82,7 +82,7 @@ module Handinger
82
82
  incomplete_details: nil,
83
83
  messages: ::Array[top],
84
84
  metadata: ::Hash[Symbol, top],
85
- object: Handinger::Models::Worker::object,
85
+ object: :worker,
86
86
  output: ::Array[Handinger::Worker::Output],
87
87
  output_text: String,
88
88
  running: bool,
@@ -111,23 +111,13 @@ module Handinger
111
111
  def to_hash: -> { filename: String?, media_type: String, url: String }
112
112
  end
113
113
 
114
- type object = :worker
115
-
116
- module Object
117
- extend Handinger::Internal::Type::Enum
118
-
119
- WORKER: :worker
120
-
121
- def self?.values: -> ::Array[Handinger::Models::Worker::object]
122
- end
123
-
124
114
  type output =
125
115
  {
126
116
  id: String,
127
117
  content: ::Array[Handinger::Worker::Output::Content],
128
- role: Handinger::Models::Worker::Output::role,
129
- status: Handinger::Models::Worker::Output::status,
130
- type: Handinger::Models::Worker::Output::type_
118
+ role: :assistant,
119
+ status: :completed,
120
+ type: :message
131
121
  }
132
122
 
133
123
  class Output < Handinger::Internal::Type::BaseModel
@@ -135,131 +125,60 @@ module Handinger
135
125
 
136
126
  attr_accessor content: ::Array[Handinger::Worker::Output::Content]
137
127
 
138
- attr_accessor role: Handinger::Models::Worker::Output::role
128
+ attr_accessor role: :assistant
139
129
 
140
- attr_accessor status: Handinger::Models::Worker::Output::status
130
+ attr_accessor status: :completed
141
131
 
142
- attr_accessor type: Handinger::Models::Worker::Output::type_
132
+ attr_accessor type: :message
143
133
 
144
134
  def initialize: (
145
135
  id: String,
146
136
  content: ::Array[Handinger::Worker::Output::Content],
147
- role: Handinger::Models::Worker::Output::role,
148
- status: Handinger::Models::Worker::Output::status,
149
- type: Handinger::Models::Worker::Output::type_
137
+ ?role: :assistant,
138
+ ?status: :completed,
139
+ ?type: :message
150
140
  ) -> void
151
141
 
152
142
  def to_hash: -> {
153
143
  id: String,
154
144
  content: ::Array[Handinger::Worker::Output::Content],
155
- role: Handinger::Models::Worker::Output::role,
156
- status: Handinger::Models::Worker::Output::status,
157
- type: Handinger::Models::Worker::Output::type_
145
+ role: :assistant,
146
+ status: :completed,
147
+ type: :message
158
148
  }
159
149
 
160
- type content =
161
- {
162
- text: String,
163
- type: Handinger::Models::Worker::Output::Content::type_
164
- }
150
+ type content = { text: String, type: :output_text }
165
151
 
166
152
  class Content < Handinger::Internal::Type::BaseModel
167
153
  attr_accessor text: String
168
154
 
169
- attr_accessor type: Handinger::Models::Worker::Output::Content::type_
155
+ attr_accessor type: :output_text
170
156
 
171
- def initialize: (
172
- text: String,
173
- type: Handinger::Models::Worker::Output::Content::type_
174
- ) -> void
157
+ def initialize: (text: String, ?type: :output_text) -> void
175
158
 
176
- def to_hash: -> {
177
- text: String,
178
- type: Handinger::Models::Worker::Output::Content::type_
179
- }
180
-
181
- type type_ = :output_text
182
-
183
- module Type
184
- extend Handinger::Internal::Type::Enum
185
-
186
- OUTPUT_TEXT: :output_text
187
-
188
- def self?.values: -> ::Array[Handinger::Models::Worker::Output::Content::type_]
189
- end
190
- end
191
-
192
- type role = :assistant
193
-
194
- module Role
195
- extend Handinger::Internal::Type::Enum
196
-
197
- ASSISTANT: :assistant
198
-
199
- def self?.values: -> ::Array[Handinger::Models::Worker::Output::role]
200
- end
201
-
202
- type status = :completed
203
-
204
- module Status
205
- extend Handinger::Internal::Type::Enum
206
-
207
- COMPLETED: :completed
208
-
209
- def self?.values: -> ::Array[Handinger::Models::Worker::Output::status]
210
- end
211
-
212
- type type_ = :message
213
-
214
- module Type
215
- extend Handinger::Internal::Type::Enum
216
-
217
- MESSAGE: :message
218
-
219
- def self?.values: -> ::Array[Handinger::Models::Worker::Output::type_]
159
+ def to_hash: -> { text: String, type: :output_text }
220
160
  end
221
161
  end
222
162
 
223
- type source =
224
- {
225
- id: String,
226
- title: String?,
227
- type: Handinger::Models::Worker::Source::type_,
228
- url: String
229
- }
163
+ type source = { id: String, title: String?, type: :url, url: String }
230
164
 
231
165
  class Source < Handinger::Internal::Type::BaseModel
232
166
  attr_accessor id: String
233
167
 
234
168
  attr_accessor title: String?
235
169
 
236
- attr_accessor type: Handinger::Models::Worker::Source::type_
170
+ attr_accessor type: :url
237
171
 
238
172
  attr_accessor url: String
239
173
 
240
174
  def initialize: (
241
175
  id: String,
242
176
  title: String?,
243
- type: Handinger::Models::Worker::Source::type_,
244
- url: String
177
+ url: String,
178
+ ?type: :url
245
179
  ) -> void
246
180
 
247
- def to_hash: -> {
248
- id: String,
249
- title: String?,
250
- type: Handinger::Models::Worker::Source::type_,
251
- url: String
252
- }
253
-
254
- type type_ = :url
255
-
256
- module Type
257
- extend Handinger::Internal::Type::Enum
258
-
259
- URL: :url
260
-
261
- def self?.values: -> ::Array[Handinger::Models::Worker::Source::type_]
262
- end
181
+ def to_hash: -> { id: String, title: String?, type: :url, url: String }
263
182
  end
264
183
 
265
184
  type status = :running | :completed | :pending
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handinger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Handinger