aws-sdk-bedrockagentruntime 1.38.0 → 1.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockagentruntime/client.rb +67 -13
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +20 -1
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +5 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +78 -1
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +11 -2
- data/sig/resource.rbs +2 -0
- data/sig/types.rbs +25 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae61bbd4a1a88db941f44e4ecd10e06b1f1f14de6530f6a58736e0e61516900e
|
4
|
+
data.tar.gz: 8a46c8d3d8fa36e86bd4f49c69fb7813c78637ab36b42c6832ecaea20e6e2a18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db74795fc29276da164fa995947f7af6b455b5c575286361ce28a4721862311d176757f5483eed0abb0bf2a31cffc419fb82349dba4962d5d8bf4e8a5eed9fad
|
7
|
+
data.tar.gz: b609981f3e48472cd1214c84b85b073a55f48e6f74f0af161f93b875789b63eb2dc0e7642ea05e7ec974d8d259691fefb9a7a207b2817d162fe1e2ce6b46278c
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.40.0 (2025-01-22)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Adds multi-turn input support for an Agent node in an Amazon Bedrock Flow
|
8
|
+
|
9
|
+
1.39.0 (2025-01-15)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Now supports streaming for inline agents.
|
13
|
+
|
4
14
|
1.38.0 (2024-12-20)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.40.0
|
@@ -268,11 +268,34 @@ module Aws::BedrockAgentRuntime
|
|
268
268
|
# Used when loading credentials from the shared credentials file
|
269
269
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
270
270
|
#
|
271
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
272
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
273
|
+
#
|
274
|
+
# * `when_supported` - (default) When set, a checksum will be
|
275
|
+
# calculated for all request payloads of operations modeled with the
|
276
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
277
|
+
# `requestAlgorithmMember` is modeled.
|
278
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
279
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
280
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
281
|
+
# is modeled and supplied.
|
282
|
+
#
|
271
283
|
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
272
284
|
# The minimum size in bytes that triggers compression for request
|
273
285
|
# bodies. The value must be non-negative integer value between 0
|
274
286
|
# and 10485780 bytes inclusive.
|
275
287
|
#
|
288
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
289
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
290
|
+
#
|
291
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
292
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
293
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
294
|
+
# are supported.
|
295
|
+
# * `when_required` - When set, checksum validation is not performed on
|
296
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
297
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
298
|
+
#
|
276
299
|
# @option options [Proc] :retry_backoff
|
277
300
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
278
301
|
# This option is only used in the `legacy` retry mode.
|
@@ -608,10 +631,7 @@ module Aws::BedrockAgentRuntime
|
|
608
631
|
req.send_request(options)
|
609
632
|
end
|
610
633
|
|
611
|
-
# <note
|
612
|
-
# including `InvokeAgent`.
|
613
|
-
#
|
614
|
-
# </note>
|
634
|
+
# <note> </note>
|
615
635
|
#
|
616
636
|
# Sends a prompt for the agent to process and respond to. Note the
|
617
637
|
# following fields for the request:
|
@@ -640,7 +660,11 @@ module Aws::BedrockAgentRuntime
|
|
640
660
|
# session or prompt or, if you configured an action group to return
|
641
661
|
# control, results from invocation of the action group.
|
642
662
|
#
|
643
|
-
# The response
|
663
|
+
# The response contains both **chunk** and **trace** attributes.
|
664
|
+
#
|
665
|
+
# The final response is returned in the `bytes` field of the `chunk`
|
666
|
+
# object. The `InvokeAgent` returns one chunk for the entire
|
667
|
+
# interaction.
|
644
668
|
#
|
645
669
|
# * The `attribution` object contains citations for parts of the
|
646
670
|
# response.
|
@@ -1626,6 +1650,10 @@ module Aws::BedrockAgentRuntime
|
|
1626
1650
|
#
|
1627
1651
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
|
1628
1652
|
#
|
1653
|
+
# @option params [String] :execution_id
|
1654
|
+
# The unique identifier for the current flow execution. If you don't
|
1655
|
+
# provide a value, Amazon Bedrock creates the identifier for you.
|
1656
|
+
#
|
1629
1657
|
# @option params [required, String] :flow_alias_identifier
|
1630
1658
|
# The unique identifier of the flow alias.
|
1631
1659
|
#
|
@@ -1641,6 +1669,7 @@ module Aws::BedrockAgentRuntime
|
|
1641
1669
|
#
|
1642
1670
|
# @return [Types::InvokeFlowResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1643
1671
|
#
|
1672
|
+
# * {Types::InvokeFlowResponse#execution_id #execution_id} => String
|
1644
1673
|
# * {Types::InvokeFlowResponse#response_stream #response_stream} => Types::FlowResponseStream
|
1645
1674
|
#
|
1646
1675
|
# @example EventStream Operation Example
|
@@ -1701,6 +1730,9 @@ module Aws::BedrockAgentRuntime
|
|
1701
1730
|
# handler.on_flow_completion_event_event do |event|
|
1702
1731
|
# event # => Aws::BedrockAgentRuntime::Types::flowCompletionEvent
|
1703
1732
|
# end
|
1733
|
+
# handler.on_flow_multi_turn_input_request_event_event do |event|
|
1734
|
+
# event # => Aws::BedrockAgentRuntime::Types::flowMultiTurnInputRequestEvent
|
1735
|
+
# end
|
1704
1736
|
# handler.on_flow_output_event_event do |event|
|
1705
1737
|
# event # => Aws::BedrockAgentRuntime::Types::flowOutputEvent
|
1706
1738
|
# end
|
@@ -1744,6 +1776,9 @@ module Aws::BedrockAgentRuntime
|
|
1744
1776
|
# stream.on_flow_completion_event_event do |event|
|
1745
1777
|
# event # => Aws::BedrockAgentRuntime::Types::flowCompletionEvent
|
1746
1778
|
# end
|
1779
|
+
# stream.on_flow_multi_turn_input_request_event_event do |event|
|
1780
|
+
# event # => Aws::BedrockAgentRuntime::Types::flowMultiTurnInputRequestEvent
|
1781
|
+
# end
|
1747
1782
|
# stream.on_flow_output_event_event do |event|
|
1748
1783
|
# event # => Aws::BedrockAgentRuntime::Types::flowOutputEvent
|
1749
1784
|
# end
|
@@ -1787,6 +1822,9 @@ module Aws::BedrockAgentRuntime
|
|
1787
1822
|
# handler.on_flow_completion_event_event do |event|
|
1788
1823
|
# event # => Aws::BedrockAgentRuntime::Types::flowCompletionEvent
|
1789
1824
|
# end
|
1825
|
+
# handler.on_flow_multi_turn_input_request_event_event do |event|
|
1826
|
+
# event # => Aws::BedrockAgentRuntime::Types::flowMultiTurnInputRequestEvent
|
1827
|
+
# end
|
1790
1828
|
# handler.on_flow_output_event_event do |event|
|
1791
1829
|
# event # => Aws::BedrockAgentRuntime::Types::flowOutputEvent
|
1792
1830
|
# end
|
@@ -1829,6 +1867,7 @@ module Aws::BedrockAgentRuntime
|
|
1829
1867
|
#
|
1830
1868
|
# resp = client.invoke_flow({
|
1831
1869
|
# enable_trace: false,
|
1870
|
+
# execution_id: "FlowExecutionId",
|
1832
1871
|
# flow_alias_identifier: "FlowAliasIdentifier", # required
|
1833
1872
|
# flow_identifier: "FlowIdentifier", # required
|
1834
1873
|
# inputs: [ # required
|
@@ -1837,8 +1876,9 @@ module Aws::BedrockAgentRuntime
|
|
1837
1876
|
# document: {
|
1838
1877
|
# },
|
1839
1878
|
# },
|
1879
|
+
# node_input_name: "NodeInputName",
|
1840
1880
|
# node_name: "NodeName", # required
|
1841
|
-
# node_output_name: "NodeOutputName",
|
1881
|
+
# node_output_name: "NodeOutputName",
|
1842
1882
|
# },
|
1843
1883
|
# ],
|
1844
1884
|
# model_performance_configuration: {
|
@@ -1850,9 +1890,10 @@ module Aws::BedrockAgentRuntime
|
|
1850
1890
|
#
|
1851
1891
|
# @example Response structure
|
1852
1892
|
#
|
1893
|
+
# resp.execution_id #=> String
|
1853
1894
|
# All events are available at resp.response_stream:
|
1854
1895
|
# resp.response_stream #=> Enumerator
|
1855
|
-
# resp.response_stream.event_types #=> [:access_denied_exception, :bad_gateway_exception, :conflict_exception, :dependency_failed_exception, :flow_completion_event, :flow_output_event, :flow_trace_event, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
|
1896
|
+
# resp.response_stream.event_types #=> [:access_denied_exception, :bad_gateway_exception, :conflict_exception, :dependency_failed_exception, :flow_completion_event, :flow_multi_turn_input_request_event, :flow_output_event, :flow_trace_event, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
|
1856
1897
|
#
|
1857
1898
|
# For :access_denied_exception event available at #on_access_denied_exception_event callback and response eventstream enumerator:
|
1858
1899
|
# event.message #=> String
|
@@ -1869,7 +1910,11 @@ module Aws::BedrockAgentRuntime
|
|
1869
1910
|
# event.resource_name #=> String
|
1870
1911
|
#
|
1871
1912
|
# For :flow_completion_event event available at #on_flow_completion_event_event callback and response eventstream enumerator:
|
1872
|
-
# event.completion_reason #=> String, one of "SUCCESS"
|
1913
|
+
# event.completion_reason #=> String, one of "SUCCESS", "INPUT_REQUIRED"
|
1914
|
+
#
|
1915
|
+
# For :flow_multi_turn_input_request_event event available at #on_flow_multi_turn_input_request_event_event callback and response eventstream enumerator:
|
1916
|
+
# event.node_name #=> String
|
1917
|
+
# event.node_type #=> String, one of "FlowInputNode", "FlowOutputNode", "LambdaFunctionNode", "KnowledgeBaseNode", "PromptNode", "ConditionNode", "LexNode"
|
1873
1918
|
#
|
1874
1919
|
# For :flow_output_event event available at #on_flow_output_event_event callback and response eventstream enumerator:
|
1875
1920
|
# event.node_name #=> String
|
@@ -1951,10 +1996,7 @@ module Aws::BedrockAgentRuntime
|
|
1951
1996
|
# one knowledge base, uses default prompts, has no action group, and
|
1952
1997
|
# user input is disabled.
|
1953
1998
|
#
|
1954
|
-
# <note
|
1955
|
-
# including `InvokeInlineAgent`.
|
1956
|
-
#
|
1957
|
-
# </note>
|
1999
|
+
# <note> </note>
|
1958
2000
|
#
|
1959
2001
|
#
|
1960
2002
|
#
|
@@ -2045,6 +2087,14 @@ module Aws::BedrockAgentRuntime
|
|
2045
2087
|
# The unique identifier of the session. Use the same value across
|
2046
2088
|
# requests to continue the same conversation.
|
2047
2089
|
#
|
2090
|
+
# @option params [Types::StreamingConfigurations] :streaming_configurations
|
2091
|
+
# Specifies the configurations for streaming.
|
2092
|
+
#
|
2093
|
+
# <note markdown="1"> To use agent streaming, you need permissions to perform the
|
2094
|
+
# `bedrock:InvokeModelWithResponseStream` action.
|
2095
|
+
#
|
2096
|
+
# </note>
|
2097
|
+
#
|
2048
2098
|
# @return [Types::InvokeInlineAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2049
2099
|
#
|
2050
2100
|
# * {Types::InvokeInlineAgentResponse#completion #completion} => Types::InlineAgentResponseStream
|
@@ -2487,6 +2537,10 @@ module Aws::BedrockAgentRuntime
|
|
2487
2537
|
# ],
|
2488
2538
|
# },
|
2489
2539
|
# session_id: "SessionId", # required
|
2540
|
+
# streaming_configurations: {
|
2541
|
+
# apply_guardrail_interval: 1,
|
2542
|
+
# stream_final_response: false,
|
2543
|
+
# },
|
2490
2544
|
# })
|
2491
2545
|
#
|
2492
2546
|
# @example Response structure
|
@@ -4302,7 +4356,7 @@ module Aws::BedrockAgentRuntime
|
|
4302
4356
|
tracer: tracer
|
4303
4357
|
)
|
4304
4358
|
context[:gem_name] = 'aws-sdk-bedrockagentruntime'
|
4305
|
-
context[:gem_version] = '1.
|
4359
|
+
context[:gem_version] = '1.40.0'
|
4306
4360
|
Seahorse::Client::Request.new(handlers, context)
|
4307
4361
|
end
|
4308
4362
|
|
@@ -112,10 +112,13 @@ module Aws::BedrockAgentRuntime
|
|
112
112
|
FlowAliasIdentifier = Shapes::StringShape.new(name: 'FlowAliasIdentifier')
|
113
113
|
FlowCompletionEvent = Shapes::StructureShape.new(name: 'FlowCompletionEvent')
|
114
114
|
FlowCompletionReason = Shapes::StringShape.new(name: 'FlowCompletionReason')
|
115
|
+
FlowExecutionId = Shapes::StringShape.new(name: 'FlowExecutionId')
|
115
116
|
FlowIdentifier = Shapes::StringShape.new(name: 'FlowIdentifier')
|
116
117
|
FlowInput = Shapes::StructureShape.new(name: 'FlowInput')
|
117
118
|
FlowInputContent = Shapes::UnionShape.new(name: 'FlowInputContent')
|
118
119
|
FlowInputs = Shapes::ListShape.new(name: 'FlowInputs')
|
120
|
+
FlowMultiTurnInputContent = Shapes::UnionShape.new(name: 'FlowMultiTurnInputContent')
|
121
|
+
FlowMultiTurnInputRequestEvent = Shapes::StructureShape.new(name: 'FlowMultiTurnInputRequestEvent')
|
119
122
|
FlowOutputContent = Shapes::UnionShape.new(name: 'FlowOutputContent')
|
120
123
|
FlowOutputEvent = Shapes::StructureShape.new(name: 'FlowOutputEvent')
|
121
124
|
FlowResponseStream = Shapes::StructureShape.new(name: 'FlowResponseStream')
|
@@ -677,8 +680,9 @@ module Aws::BedrockAgentRuntime
|
|
677
680
|
FlowCompletionEvent.struct_class = Types::FlowCompletionEvent
|
678
681
|
|
679
682
|
FlowInput.add_member(:content, Shapes::ShapeRef.new(shape: FlowInputContent, required: true, location_name: "content"))
|
683
|
+
FlowInput.add_member(:node_input_name, Shapes::ShapeRef.new(shape: NodeInputName, location_name: "nodeInputName"))
|
680
684
|
FlowInput.add_member(:node_name, Shapes::ShapeRef.new(shape: NodeName, required: true, location_name: "nodeName"))
|
681
|
-
FlowInput.add_member(:node_output_name, Shapes::ShapeRef.new(shape: NodeOutputName,
|
685
|
+
FlowInput.add_member(:node_output_name, Shapes::ShapeRef.new(shape: NodeOutputName, location_name: "nodeOutputName"))
|
682
686
|
FlowInput.struct_class = Types::FlowInput
|
683
687
|
|
684
688
|
FlowInputContent.add_member(:document, Shapes::ShapeRef.new(shape: Document, location_name: "document"))
|
@@ -689,6 +693,17 @@ module Aws::BedrockAgentRuntime
|
|
689
693
|
|
690
694
|
FlowInputs.member = Shapes::ShapeRef.new(shape: FlowInput)
|
691
695
|
|
696
|
+
FlowMultiTurnInputContent.add_member(:document, Shapes::ShapeRef.new(shape: Document, location_name: "document"))
|
697
|
+
FlowMultiTurnInputContent.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
698
|
+
FlowMultiTurnInputContent.add_member_subclass(:document, Types::FlowMultiTurnInputContent::Document)
|
699
|
+
FlowMultiTurnInputContent.add_member_subclass(:unknown, Types::FlowMultiTurnInputContent::Unknown)
|
700
|
+
FlowMultiTurnInputContent.struct_class = Types::FlowMultiTurnInputContent
|
701
|
+
|
702
|
+
FlowMultiTurnInputRequestEvent.add_member(:content, Shapes::ShapeRef.new(shape: FlowMultiTurnInputContent, required: true, location_name: "content"))
|
703
|
+
FlowMultiTurnInputRequestEvent.add_member(:node_name, Shapes::ShapeRef.new(shape: NodeName, required: true, location_name: "nodeName"))
|
704
|
+
FlowMultiTurnInputRequestEvent.add_member(:node_type, Shapes::ShapeRef.new(shape: NodeType, required: true, location_name: "nodeType"))
|
705
|
+
FlowMultiTurnInputRequestEvent.struct_class = Types::FlowMultiTurnInputRequestEvent
|
706
|
+
|
692
707
|
FlowOutputContent.add_member(:document, Shapes::ShapeRef.new(shape: Document, location_name: "document"))
|
693
708
|
FlowOutputContent.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
694
709
|
FlowOutputContent.add_member_subclass(:document, Types::FlowOutputContent::Document)
|
@@ -705,6 +720,7 @@ module Aws::BedrockAgentRuntime
|
|
705
720
|
FlowResponseStream.add_member(:conflict_exception, Shapes::ShapeRef.new(shape: ConflictException, location_name: "conflictException"))
|
706
721
|
FlowResponseStream.add_member(:dependency_failed_exception, Shapes::ShapeRef.new(shape: DependencyFailedException, location_name: "dependencyFailedException"))
|
707
722
|
FlowResponseStream.add_member(:flow_completion_event, Shapes::ShapeRef.new(shape: FlowCompletionEvent, event: true, location_name: "flowCompletionEvent"))
|
723
|
+
FlowResponseStream.add_member(:flow_multi_turn_input_request_event, Shapes::ShapeRef.new(shape: FlowMultiTurnInputRequestEvent, event: true, location_name: "flowMultiTurnInputRequestEvent"))
|
708
724
|
FlowResponseStream.add_member(:flow_output_event, Shapes::ShapeRef.new(shape: FlowOutputEvent, event: true, location_name: "flowOutputEvent"))
|
709
725
|
FlowResponseStream.add_member(:flow_trace_event, Shapes::ShapeRef.new(shape: FlowTraceEvent, event: true, location_name: "flowTraceEvent"))
|
710
726
|
FlowResponseStream.add_member(:internal_server_exception, Shapes::ShapeRef.new(shape: InternalServerException, location_name: "internalServerException"))
|
@@ -1042,12 +1058,14 @@ module Aws::BedrockAgentRuntime
|
|
1042
1058
|
InvokeAgentResponse[:payload_member] = InvokeAgentResponse.member(:completion)
|
1043
1059
|
|
1044
1060
|
InvokeFlowRequest.add_member(:enable_trace, Shapes::ShapeRef.new(shape: Boolean, location_name: "enableTrace"))
|
1061
|
+
InvokeFlowRequest.add_member(:execution_id, Shapes::ShapeRef.new(shape: FlowExecutionId, location_name: "executionId"))
|
1045
1062
|
InvokeFlowRequest.add_member(:flow_alias_identifier, Shapes::ShapeRef.new(shape: FlowAliasIdentifier, required: true, location: "uri", location_name: "flowAliasIdentifier"))
|
1046
1063
|
InvokeFlowRequest.add_member(:flow_identifier, Shapes::ShapeRef.new(shape: FlowIdentifier, required: true, location: "uri", location_name: "flowIdentifier"))
|
1047
1064
|
InvokeFlowRequest.add_member(:inputs, Shapes::ShapeRef.new(shape: FlowInputs, required: true, location_name: "inputs"))
|
1048
1065
|
InvokeFlowRequest.add_member(:model_performance_configuration, Shapes::ShapeRef.new(shape: ModelPerformanceConfiguration, location_name: "modelPerformanceConfiguration"))
|
1049
1066
|
InvokeFlowRequest.struct_class = Types::InvokeFlowRequest
|
1050
1067
|
|
1068
|
+
InvokeFlowResponse.add_member(:execution_id, Shapes::ShapeRef.new(shape: FlowExecutionId, location: "header", location_name: "x-amz-bedrock-flow-execution-id"))
|
1051
1069
|
InvokeFlowResponse.add_member(:response_stream, Shapes::ShapeRef.new(shape: FlowResponseStream, required: true, eventstream: true, location_name: "responseStream"))
|
1052
1070
|
InvokeFlowResponse.struct_class = Types::InvokeFlowResponse
|
1053
1071
|
InvokeFlowResponse[:payload] = :response_stream
|
@@ -1067,6 +1085,7 @@ module Aws::BedrockAgentRuntime
|
|
1067
1085
|
InvokeInlineAgentRequest.add_member(:knowledge_bases, Shapes::ShapeRef.new(shape: KnowledgeBases, location_name: "knowledgeBases"))
|
1068
1086
|
InvokeInlineAgentRequest.add_member(:prompt_override_configuration, Shapes::ShapeRef.new(shape: PromptOverrideConfiguration, location_name: "promptOverrideConfiguration"))
|
1069
1087
|
InvokeInlineAgentRequest.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, required: true, location: "uri", location_name: "sessionId"))
|
1088
|
+
InvokeInlineAgentRequest.add_member(:streaming_configurations, Shapes::ShapeRef.new(shape: StreamingConfigurations, location_name: "streamingConfigurations"))
|
1070
1089
|
InvokeInlineAgentRequest.struct_class = Types::InvokeInlineAgentRequest
|
1071
1090
|
|
1072
1091
|
InvokeInlineAgentResponse.add_member(:completion, Shapes::ShapeRef.new(shape: InlineAgentResponseStream, required: true, eventstream: true, location_name: "completion"))
|
@@ -134,6 +134,10 @@ module Aws::BedrockAgentRuntime
|
|
134
134
|
@event_emitter.on(:flow_completion_event, block) if block_given?
|
135
135
|
end
|
136
136
|
|
137
|
+
def on_flow_multi_turn_input_request_event_event(&block)
|
138
|
+
@event_emitter.on(:flow_multi_turn_input_request_event, block) if block_given?
|
139
|
+
end
|
140
|
+
|
137
141
|
def on_flow_output_event_event(&block)
|
138
142
|
@event_emitter.on(:flow_output_event, block) if block_given?
|
139
143
|
end
|
@@ -180,6 +184,7 @@ module Aws::BedrockAgentRuntime
|
|
180
184
|
on_conflict_exception_event(&block)
|
181
185
|
on_dependency_failed_exception_event(&block)
|
182
186
|
on_flow_completion_event_event(&block)
|
187
|
+
on_flow_multi_turn_input_request_event_event(&block)
|
183
188
|
on_flow_output_event_event(&block)
|
184
189
|
on_flow_trace_event_event(&block)
|
185
190
|
on_internal_server_exception_event(&block)
|
@@ -1197,6 +1197,10 @@ module Aws::BedrockAgentRuntime
|
|
1197
1197
|
# Contains information about an input into the prompt flow.
|
1198
1198
|
# @return [Types::FlowInputContent]
|
1199
1199
|
#
|
1200
|
+
# @!attribute [rw] node_input_name
|
1201
|
+
# The name of the input from the flow input node.
|
1202
|
+
# @return [String]
|
1203
|
+
#
|
1200
1204
|
# @!attribute [rw] node_name
|
1201
1205
|
# The name of the flow input node that begins the prompt flow.
|
1202
1206
|
# @return [String]
|
@@ -1210,6 +1214,7 @@ module Aws::BedrockAgentRuntime
|
|
1210
1214
|
#
|
1211
1215
|
class FlowInput < Struct.new(
|
1212
1216
|
:content,
|
1217
|
+
:node_input_name,
|
1213
1218
|
:node_name,
|
1214
1219
|
:node_output_name)
|
1215
1220
|
SENSITIVE = [:content]
|
@@ -1237,6 +1242,56 @@ module Aws::BedrockAgentRuntime
|
|
1237
1242
|
class Unknown < FlowInputContent; end
|
1238
1243
|
end
|
1239
1244
|
|
1245
|
+
# The content structure containing input information for multi-turn flow
|
1246
|
+
# interactions.
|
1247
|
+
#
|
1248
|
+
# @note FlowMultiTurnInputContent is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of FlowMultiTurnInputContent corresponding to the set member.
|
1249
|
+
#
|
1250
|
+
# @!attribute [rw] document
|
1251
|
+
# The requested additional input to send back to the multi-turn flow
|
1252
|
+
# node.
|
1253
|
+
# @return [Hash,Array,String,Numeric,Boolean]
|
1254
|
+
#
|
1255
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowMultiTurnInputContent AWS API Documentation
|
1256
|
+
#
|
1257
|
+
class FlowMultiTurnInputContent < Struct.new(
|
1258
|
+
:document,
|
1259
|
+
:unknown)
|
1260
|
+
SENSITIVE = []
|
1261
|
+
include Aws::Structure
|
1262
|
+
include Aws::Structure::Union
|
1263
|
+
|
1264
|
+
class Document < FlowMultiTurnInputContent; end
|
1265
|
+
class Unknown < FlowMultiTurnInputContent; end
|
1266
|
+
end
|
1267
|
+
|
1268
|
+
# Response object from the flow multi-turn node requesting additional
|
1269
|
+
# information.
|
1270
|
+
#
|
1271
|
+
# @!attribute [rw] content
|
1272
|
+
# The content payload containing the input request details for the
|
1273
|
+
# multi-turn interaction.
|
1274
|
+
# @return [Types::FlowMultiTurnInputContent]
|
1275
|
+
#
|
1276
|
+
# @!attribute [rw] node_name
|
1277
|
+
# The name of the node in the flow that is requesting the input.
|
1278
|
+
# @return [String]
|
1279
|
+
#
|
1280
|
+
# @!attribute [rw] node_type
|
1281
|
+
# The type of the node in the flow that is requesting the input.
|
1282
|
+
# @return [String]
|
1283
|
+
#
|
1284
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowMultiTurnInputRequestEvent AWS API Documentation
|
1285
|
+
#
|
1286
|
+
class FlowMultiTurnInputRequestEvent < Struct.new(
|
1287
|
+
:content,
|
1288
|
+
:node_name,
|
1289
|
+
:node_type,
|
1290
|
+
:event_type)
|
1291
|
+
SENSITIVE = []
|
1292
|
+
include Aws::Structure
|
1293
|
+
end
|
1294
|
+
|
1240
1295
|
# Contains information about the content in an output from prompt flow
|
1241
1296
|
# invocation.
|
1242
1297
|
#
|
@@ -2869,6 +2924,11 @@ module Aws::BedrockAgentRuntime
|
|
2869
2924
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
|
2870
2925
|
# @return [Boolean]
|
2871
2926
|
#
|
2927
|
+
# @!attribute [rw] execution_id
|
2928
|
+
# The unique identifier for the current flow execution. If you don't
|
2929
|
+
# provide a value, Amazon Bedrock creates the identifier for you.
|
2930
|
+
# @return [String]
|
2931
|
+
#
|
2872
2932
|
# @!attribute [rw] flow_alias_identifier
|
2873
2933
|
# The unique identifier of the flow alias.
|
2874
2934
|
# @return [String]
|
@@ -2890,6 +2950,7 @@ module Aws::BedrockAgentRuntime
|
|
2890
2950
|
#
|
2891
2951
|
class InvokeFlowRequest < Struct.new(
|
2892
2952
|
:enable_trace,
|
2953
|
+
:execution_id,
|
2893
2954
|
:flow_alias_identifier,
|
2894
2955
|
:flow_identifier,
|
2895
2956
|
:inputs,
|
@@ -2898,6 +2959,10 @@ module Aws::BedrockAgentRuntime
|
|
2898
2959
|
include Aws::Structure
|
2899
2960
|
end
|
2900
2961
|
|
2962
|
+
# @!attribute [rw] execution_id
|
2963
|
+
# The unique identifier for the current flow execution.
|
2964
|
+
# @return [String]
|
2965
|
+
#
|
2901
2966
|
# @!attribute [rw] response_stream
|
2902
2967
|
# The output of the flow, returned as a stream. If there's an error,
|
2903
2968
|
# the error is returned.
|
@@ -2906,6 +2971,7 @@ module Aws::BedrockAgentRuntime
|
|
2906
2971
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeFlowResponse AWS API Documentation
|
2907
2972
|
#
|
2908
2973
|
class InvokeFlowResponse < Struct.new(
|
2974
|
+
:execution_id,
|
2909
2975
|
:response_stream)
|
2910
2976
|
SENSITIVE = []
|
2911
2977
|
include Aws::Structure
|
@@ -3011,6 +3077,15 @@ module Aws::BedrockAgentRuntime
|
|
3011
3077
|
# requests to continue the same conversation.
|
3012
3078
|
# @return [String]
|
3013
3079
|
#
|
3080
|
+
# @!attribute [rw] streaming_configurations
|
3081
|
+
# Specifies the configurations for streaming.
|
3082
|
+
#
|
3083
|
+
# <note markdown="1"> To use agent streaming, you need permissions to perform the
|
3084
|
+
# `bedrock:InvokeModelWithResponseStream` action.
|
3085
|
+
#
|
3086
|
+
# </note>
|
3087
|
+
# @return [Types::StreamingConfigurations]
|
3088
|
+
#
|
3014
3089
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeInlineAgentRequest AWS API Documentation
|
3015
3090
|
#
|
3016
3091
|
class InvokeInlineAgentRequest < Struct.new(
|
@@ -3027,7 +3102,8 @@ module Aws::BedrockAgentRuntime
|
|
3027
3102
|
:instruction,
|
3028
3103
|
:knowledge_bases,
|
3029
3104
|
:prompt_override_configuration,
|
3030
|
-
:session_id
|
3105
|
+
:session_id,
|
3106
|
+
:streaming_configurations)
|
3031
3107
|
SENSITIVE = [:input_text, :instruction, :prompt_override_configuration]
|
3032
3108
|
include Aws::Structure
|
3033
3109
|
end
|
@@ -6246,6 +6322,7 @@ module Aws::BedrockAgentRuntime
|
|
6246
6322
|
:conflict_exception,
|
6247
6323
|
:dependency_failed_exception,
|
6248
6324
|
:flow_completion_event,
|
6325
|
+
:flow_multi_turn_input_request_event,
|
6249
6326
|
:flow_output_event,
|
6250
6327
|
:flow_trace_event,
|
6251
6328
|
:internal_server_exception,
|
data/sig/client.rbs
CHANGED
@@ -42,7 +42,9 @@ module Aws
|
|
42
42
|
?max_attempts: Integer,
|
43
43
|
?output_event_stream_handler: Proc,
|
44
44
|
?profile: String,
|
45
|
+
?request_checksum_calculation: String,
|
45
46
|
?request_min_compression_size_bytes: Integer,
|
47
|
+
?response_checksum_validation: String,
|
46
48
|
?retry_backoff: Proc,
|
47
49
|
?retry_base_delay: Float,
|
48
50
|
?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
|
@@ -328,11 +330,13 @@ module Aws
|
|
328
330
|
|
329
331
|
interface _InvokeFlowResponseSuccess
|
330
332
|
include ::Seahorse::Client::_ResponseSuccess[Types::InvokeFlowResponse]
|
333
|
+
def execution_id: () -> ::String
|
331
334
|
def response_stream: () -> Types::FlowResponseStream
|
332
335
|
end
|
333
336
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#invoke_flow-instance_method
|
334
337
|
def invoke_flow: (
|
335
338
|
?enable_trace: bool,
|
339
|
+
?execution_id: ::String,
|
336
340
|
flow_alias_identifier: ::String,
|
337
341
|
flow_identifier: ::String,
|
338
342
|
inputs: Array[
|
@@ -341,8 +345,9 @@ module Aws
|
|
341
345
|
document: {
|
342
346
|
}?
|
343
347
|
},
|
348
|
+
node_input_name: ::String?,
|
344
349
|
node_name: ::String,
|
345
|
-
node_output_name: ::String
|
350
|
+
node_output_name: ::String?
|
346
351
|
},
|
347
352
|
],
|
348
353
|
?model_performance_configuration: {
|
@@ -586,7 +591,11 @@ module Aws
|
|
586
591
|
},
|
587
592
|
]
|
588
593
|
},
|
589
|
-
session_id: ::String
|
594
|
+
session_id: ::String,
|
595
|
+
?streaming_configurations: {
|
596
|
+
apply_guardrail_interval: ::Integer?,
|
597
|
+
stream_final_response: bool?
|
598
|
+
}
|
590
599
|
) ?{ (*untyped) -> void } -> _InvokeInlineAgentResponseSuccess
|
591
600
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeInlineAgentResponseSuccess
|
592
601
|
|
data/sig/resource.rbs
CHANGED
@@ -42,7 +42,9 @@ module Aws
|
|
42
42
|
?max_attempts: Integer,
|
43
43
|
?output_event_stream_handler: Proc,
|
44
44
|
?profile: String,
|
45
|
+
?request_checksum_calculation: String,
|
45
46
|
?request_min_compression_size_bytes: Integer,
|
47
|
+
?response_checksum_validation: String,
|
46
48
|
?retry_backoff: Proc,
|
47
49
|
?retry_base_delay: Float,
|
48
50
|
?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
|
data/sig/types.rbs
CHANGED
@@ -333,13 +333,14 @@ module Aws::BedrockAgentRuntime
|
|
333
333
|
end
|
334
334
|
|
335
335
|
class FlowCompletionEvent
|
336
|
-
attr_accessor completion_reason: ("SUCCESS")
|
336
|
+
attr_accessor completion_reason: ("SUCCESS" | "INPUT_REQUIRED")
|
337
337
|
attr_accessor event_type: untyped
|
338
338
|
SENSITIVE: []
|
339
339
|
end
|
340
340
|
|
341
341
|
class FlowInput
|
342
342
|
attr_accessor content: Types::FlowInputContent
|
343
|
+
attr_accessor node_input_name: ::String
|
343
344
|
attr_accessor node_name: ::String
|
344
345
|
attr_accessor node_output_name: ::String
|
345
346
|
SENSITIVE: [:content]
|
@@ -356,6 +357,25 @@ module Aws::BedrockAgentRuntime
|
|
356
357
|
end
|
357
358
|
end
|
358
359
|
|
360
|
+
class FlowMultiTurnInputContent
|
361
|
+
attr_accessor document: untyped
|
362
|
+
attr_accessor unknown: untyped
|
363
|
+
SENSITIVE: []
|
364
|
+
|
365
|
+
class Document < FlowMultiTurnInputContent
|
366
|
+
end
|
367
|
+
class Unknown < FlowMultiTurnInputContent
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
class FlowMultiTurnInputRequestEvent
|
372
|
+
attr_accessor content: Types::FlowMultiTurnInputContent
|
373
|
+
attr_accessor node_name: ::String
|
374
|
+
attr_accessor node_type: ("FlowInputNode" | "FlowOutputNode" | "LambdaFunctionNode" | "KnowledgeBaseNode" | "PromptNode" | "ConditionNode" | "LexNode")
|
375
|
+
attr_accessor event_type: untyped
|
376
|
+
SENSITIVE: []
|
377
|
+
end
|
378
|
+
|
359
379
|
class FlowOutputContent
|
360
380
|
attr_accessor document: untyped
|
361
381
|
attr_accessor unknown: untyped
|
@@ -797,6 +817,7 @@ module Aws::BedrockAgentRuntime
|
|
797
817
|
|
798
818
|
class InvokeFlowRequest
|
799
819
|
attr_accessor enable_trace: bool
|
820
|
+
attr_accessor execution_id: ::String
|
800
821
|
attr_accessor flow_alias_identifier: ::String
|
801
822
|
attr_accessor flow_identifier: ::String
|
802
823
|
attr_accessor inputs: ::Array[Types::FlowInput]
|
@@ -805,6 +826,7 @@ module Aws::BedrockAgentRuntime
|
|
805
826
|
end
|
806
827
|
|
807
828
|
class InvokeFlowResponse
|
829
|
+
attr_accessor execution_id: ::String
|
808
830
|
attr_accessor response_stream: Types::FlowResponseStream
|
809
831
|
SENSITIVE: []
|
810
832
|
end
|
@@ -824,6 +846,7 @@ module Aws::BedrockAgentRuntime
|
|
824
846
|
attr_accessor knowledge_bases: ::Array[Types::KnowledgeBase]
|
825
847
|
attr_accessor prompt_override_configuration: Types::PromptOverrideConfiguration
|
826
848
|
attr_accessor session_id: ::String
|
849
|
+
attr_accessor streaming_configurations: Types::StreamingConfigurations
|
827
850
|
SENSITIVE: [:input_text, :instruction, :prompt_override_configuration]
|
828
851
|
end
|
829
852
|
|
@@ -1654,7 +1677,7 @@ module Aws::BedrockAgentRuntime
|
|
1654
1677
|
end
|
1655
1678
|
|
1656
1679
|
class FlowResponseStream < Enumerator[untyped, untyped]
|
1657
|
-
def event_types: () -> [:access_denied_exception, :bad_gateway_exception, :conflict_exception, :dependency_failed_exception, :flow_completion_event, :flow_output_event, :flow_trace_event, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
|
1680
|
+
def event_types: () -> [:access_denied_exception, :bad_gateway_exception, :conflict_exception, :dependency_failed_exception, :flow_completion_event, :flow_multi_turn_input_request_event, :flow_output_event, :flow_trace_event, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
|
1658
1681
|
end
|
1659
1682
|
|
1660
1683
|
class InlineAgentResponseStream < Enumerator[untyped, untyped]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-bedrockagentruntime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.40.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:
|
11
|
+
date: 2025-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.216.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.216.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|