aws-sdk-bedrockruntime 1.0.0 → 1.2.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: 8be2863c46a7bc3ffa85df4320eced4231bb17befc0ebd1c82de115e4b8e0dbc
4
- data.tar.gz: 6d42d82d9dfbbf795975b89eb89a2a2645b0c3ad544d8ee16a1bdb2c5ede1f82
3
+ metadata.gz: a79c0b98c5238dc930554e2ac96ffaff97d2019beb4e63163121da0bea54d9da
4
+ data.tar.gz: e268bf991b9b4adee940c3038af1d4bddd30b98c7788e0e75f3c39897aa757ba
5
5
  SHA512:
6
- metadata.gz: 70550c8a2a1cdd3066aef8c9901666dba987b8b4eb931826f31a500220913e14c68e20e4b26725d943811d8590c08a39f2f5fd387daeb29cdbb5297add12b63c
7
- data.tar.gz: fbf72de8ee1a0c13c0484359fc4cd89099cd9d251c268bf5749cced229265ae88a2ef8bdaa3b99c75758d986114d065a96ccade6e4e26a8ce69dfa7e4a58396e
6
+ metadata.gz: ec50eb1b8b40f00813209c6059ab8a0c0b36b6d608eb020b0cd09e6aa850b7e1a3aa23cef329a8cc4dc513739d9c66a33765e3acdb3014084d9a74957e15fbda
7
+ data.tar.gz: 879a2cc4d9ccfbb6ed92c8bfcb669b1557cc9c1bc0c3f58cf60d07d1b47365b89869ef16b02ff02832a3d37e9201542e04ca9c31ceef945915c0b58b13c03236
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.2.0 (2023-11-14)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ * Issue - Fix exception handling with event streaming operations.
10
+
11
+ 1.1.0 (2023-10-02)
12
+ ------------------
13
+
14
+ * Feature - Add model timeout exception for InvokeModelWithResponseStream API and update validator for invoke model identifier.
15
+
4
16
  1.0.0 (2023-09-28)
5
17
  ------------------
6
18
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.2.0
@@ -403,14 +403,14 @@ module Aws::BedrockRuntime
403
403
  # provided in the request body. You use InvokeModel to run inference for
404
404
  # text models, image models, and embedding models.
405
405
  #
406
- # For more information about invoking models, see Using the API in the
407
- # [Bedrock User Guide][1].
406
+ # For more information, see [Run inference][1] in the Bedrock User
407
+ # Guide.
408
408
  #
409
409
  # For example requests, see Examples (after the Errors section).
410
410
  #
411
411
  #
412
412
  #
413
- # [1]: https://d2eo22ngex1n9g.cloudfront.net/Documentation/BedrockUserGuide.pdf
413
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
414
414
  #
415
415
  # @option params [String] :accept
416
416
  # The desired MIME type of the inference body in the response. The
@@ -463,15 +463,15 @@ module Aws::BedrockRuntime
463
463
  # Invoke the specified Bedrock model to run inference using the input
464
464
  # provided. Return the response in a stream.
465
465
  #
466
- # For more information about invoking models, see Using the API in the
467
- # [Bedrock User Guide][1].
466
+ # For more information, see [Run inference][1] in the Bedrock User
467
+ # Guide.
468
468
  #
469
469
  # For an example request and response, see Examples (after the Errors
470
470
  # section).
471
471
  #
472
472
  #
473
473
  #
474
- # [1]: https://d2eo22ngex1n9g.cloudfront.net/Documentation/BedrockUserGuide.pdf
474
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
475
475
  #
476
476
  # @option params [String] :accept
477
477
  # The desired MIME type of the inference body in the response. The
@@ -550,6 +550,9 @@ module Aws::BedrockRuntime
550
550
  # handler.on_model_stream_error_exception_event do |event|
551
551
  # event # => Aws::BedrockRuntime::Types::modelStreamErrorException
552
552
  # end
553
+ # handler.on_model_timeout_exception_event do |event|
554
+ # event # => Aws::BedrockRuntime::Types::modelTimeoutException
555
+ # end
553
556
  # handler.on_throttling_exception_event do |event|
554
557
  # event # => Aws::BedrockRuntime::Types::throttlingException
555
558
  # end
@@ -572,6 +575,9 @@ module Aws::BedrockRuntime
572
575
  # stream.on_model_stream_error_exception_event do |event|
573
576
  # event # => Aws::BedrockRuntime::Types::modelStreamErrorException
574
577
  # end
578
+ # stream.on_model_timeout_exception_event do |event|
579
+ # event # => Aws::BedrockRuntime::Types::modelTimeoutException
580
+ # end
575
581
  # stream.on_throttling_exception_event do |event|
576
582
  # event # => Aws::BedrockRuntime::Types::throttlingException
577
583
  # end
@@ -594,6 +600,9 @@ module Aws::BedrockRuntime
594
600
  # handler.on_model_stream_error_exception_event do |event|
595
601
  # event # => Aws::BedrockRuntime::Types::modelStreamErrorException
596
602
  # end
603
+ # handler.on_model_timeout_exception_event do |event|
604
+ # event # => Aws::BedrockRuntime::Types::modelTimeoutException
605
+ # end
597
606
  # handler.on_throttling_exception_event do |event|
598
607
  # event # => Aws::BedrockRuntime::Types::throttlingException
599
608
  # end
@@ -631,7 +640,7 @@ module Aws::BedrockRuntime
631
640
  #
632
641
  # All events are available at resp.body:
633
642
  # resp.body #=> Enumerator
634
- # resp.body.event_types #=> [:chunk, :internal_server_exception, :model_stream_error_exception, :throttling_exception, :validation_exception]
643
+ # resp.body.event_types #=> [:chunk, :internal_server_exception, :model_stream_error_exception, :model_timeout_exception, :throttling_exception, :validation_exception]
635
644
  #
636
645
  # For :chunk event available at #on_chunk_event callback and response eventstream enumerator:
637
646
  # event.bytes #=> String
@@ -644,6 +653,9 @@ module Aws::BedrockRuntime
644
653
  # event.original_message #=> String
645
654
  # event.original_status_code #=> Integer
646
655
  #
656
+ # For :model_timeout_exception event available at #on_model_timeout_exception_event callback and response eventstream enumerator:
657
+ # event.message #=> String
658
+ #
647
659
  # For :throttling_exception event available at #on_throttling_exception_event callback and response eventstream enumerator:
648
660
  # event.message #=> String
649
661
  #
@@ -692,7 +704,7 @@ module Aws::BedrockRuntime
692
704
  params: params,
693
705
  config: config)
694
706
  context[:gem_name] = 'aws-sdk-bedrockruntime'
695
- context[:gem_version] = '1.0.0'
707
+ context[:gem_version] = '1.2.0'
696
708
  Seahorse::Client::Request.new(handlers, context)
697
709
  end
698
710
 
@@ -95,6 +95,7 @@ module Aws::BedrockRuntime
95
95
  ResponseStream.add_member(:chunk, Shapes::ShapeRef.new(shape: PayloadPart, event: true, location_name: "chunk"))
96
96
  ResponseStream.add_member(:internal_server_exception, Shapes::ShapeRef.new(shape: InternalServerException, location_name: "internalServerException"))
97
97
  ResponseStream.add_member(:model_stream_error_exception, Shapes::ShapeRef.new(shape: ModelStreamErrorException, location_name: "modelStreamErrorException"))
98
+ ResponseStream.add_member(:model_timeout_exception, Shapes::ShapeRef.new(shape: ModelTimeoutException, location_name: "modelTimeoutException"))
98
99
  ResponseStream.add_member(:throttling_exception, Shapes::ShapeRef.new(shape: ThrottlingException, location_name: "throttlingException"))
99
100
  ResponseStream.add_member(:validation_exception, Shapes::ShapeRef.new(shape: ValidationException, location_name: "validationException"))
100
101
  ResponseStream.struct_class = Types::ResponseStream
@@ -27,6 +27,10 @@ module Aws::BedrockRuntime
27
27
  @event_emitter.on(:model_stream_error_exception, block) if block_given?
28
28
  end
29
29
 
30
+ def on_model_timeout_exception_event(&block)
31
+ @event_emitter.on(:model_timeout_exception, block) if block_given?
32
+ end
33
+
30
34
  def on_throttling_exception_event(&block)
31
35
  @event_emitter.on(:throttling_exception, block) if block_given?
32
36
  end
@@ -51,6 +55,7 @@ module Aws::BedrockRuntime
51
55
  on_chunk_event(&block)
52
56
  on_internal_server_exception_event(&block)
53
57
  on_model_stream_error_exception_event(&block)
58
+ on_model_timeout_exception_event(&block)
54
59
  on_throttling_exception_event(&block)
55
60
  on_validation_exception_event(&block)
56
61
  on_error_event(&block)
@@ -31,7 +31,8 @@ module Aws::BedrockRuntime
31
31
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InternalServerException AWS API Documentation
32
32
  #
33
33
  class InternalServerException < Struct.new(
34
- :message)
34
+ :message,
35
+ :event_type)
35
36
  SENSITIVE = []
36
37
  include Aws::Structure
37
38
  end
@@ -207,7 +208,8 @@ module Aws::BedrockRuntime
207
208
  class ModelStreamErrorException < Struct.new(
208
209
  :message,
209
210
  :original_message,
210
- :original_status_code)
211
+ :original_status_code,
212
+ :event_type)
211
213
  SENSITIVE = []
212
214
  include Aws::Structure
213
215
  end
@@ -221,7 +223,8 @@ module Aws::BedrockRuntime
221
223
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ModelTimeoutException AWS API Documentation
222
224
  #
223
225
  class ModelTimeoutException < Struct.new(
224
- :message)
226
+ :message,
227
+ :event_type)
225
228
  SENSITIVE = []
226
229
  include Aws::Structure
227
230
  end
@@ -277,7 +280,8 @@ module Aws::BedrockRuntime
277
280
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ThrottlingException AWS API Documentation
278
281
  #
279
282
  class ThrottlingException < Struct.new(
280
- :message)
283
+ :message,
284
+ :event_type)
281
285
  SENSITIVE = []
282
286
  include Aws::Structure
283
287
  end
@@ -291,7 +295,8 @@ module Aws::BedrockRuntime
291
295
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ValidationException AWS API Documentation
292
296
  #
293
297
  class ValidationException < Struct.new(
294
- :message)
298
+ :message,
299
+ :event_type)
295
300
  SENSITIVE = []
296
301
  include Aws::Structure
297
302
  end
@@ -310,6 +315,7 @@ module Aws::BedrockRuntime
310
315
  :chunk,
311
316
  :internal_server_exception,
312
317
  :model_stream_error_exception,
318
+ :model_timeout_exception,
313
319
  :throttling_exception,
314
320
  :validation_exception
315
321
  ]
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-bedrockruntime/event_streams'
53
53
  # @!group service
54
54
  module Aws::BedrockRuntime
55
55
 
56
- GEM_VERSION = '1.0.0'
56
+ GEM_VERSION = '1.2.0'
57
57
 
58
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-28 00:00:00.000000000 Z
11
+ date: 2023-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core