Skip to content

Commit 3a8bb67

Browse files
Documentation update, adding clarity and rephrasing.
This release improves support for newer models in Amazon Bedrock Flows. This release adds Reasoning Content support to Converse and ConverseStream APIs Adding support for ReasoningContent fields in Pre-Processing, Post-Processing and Orchestration Trace outputs.
1 parent c0eab4e commit 3a8bb67

File tree

49 files changed

+1937
-885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1937
-885
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.512
1+
1.11.513

generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/model/OrchestrationModelInvocationOutput.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
88
#include <aws/bedrock-agent-runtime/model/Metadata.h>
99
#include <aws/bedrock-agent-runtime/model/RawResponse.h>
10+
#include <aws/bedrock-agent-runtime/model/ReasoningContentBlock.h>
1011
#include <aws/core/utils/memory/stl/AWSString.h>
1112
#include <utility>
1213

@@ -65,6 +66,19 @@ namespace Model
6566
inline OrchestrationModelInvocationOutput& WithRawResponse(RawResponse&& value) { SetRawResponse(std::move(value)); return *this;}
6667
///@}
6768

69+
///@{
70+
/**
71+
* <p>Contains content about the reasoning that the model made during the
72+
* orchestration step. </p>
73+
*/
74+
inline const ReasoningContentBlock& GetReasoningContent() const{ return m_reasoningContent; }
75+
inline bool ReasoningContentHasBeenSet() const { return m_reasoningContentHasBeenSet; }
76+
inline void SetReasoningContent(const ReasoningContentBlock& value) { m_reasoningContentHasBeenSet = true; m_reasoningContent = value; }
77+
inline void SetReasoningContent(ReasoningContentBlock&& value) { m_reasoningContentHasBeenSet = true; m_reasoningContent = std::move(value); }
78+
inline OrchestrationModelInvocationOutput& WithReasoningContent(const ReasoningContentBlock& value) { SetReasoningContent(value); return *this;}
79+
inline OrchestrationModelInvocationOutput& WithReasoningContent(ReasoningContentBlock&& value) { SetReasoningContent(std::move(value)); return *this;}
80+
///@}
81+
6882
///@{
6983
/**
7084
* <p>The unique identifier of the trace.</p>
@@ -86,6 +100,9 @@ namespace Model
86100
RawResponse m_rawResponse;
87101
bool m_rawResponseHasBeenSet = false;
88102

103+
ReasoningContentBlock m_reasoningContent;
104+
bool m_reasoningContentHasBeenSet = false;
105+
89106
Aws::String m_traceId;
90107
bool m_traceIdHasBeenSet = false;
91108
};

generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/model/PostProcessingModelInvocationOutput.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <aws/bedrock-agent-runtime/model/Metadata.h>
99
#include <aws/bedrock-agent-runtime/model/PostProcessingParsedResponse.h>
1010
#include <aws/bedrock-agent-runtime/model/RawResponse.h>
11+
#include <aws/bedrock-agent-runtime/model/ReasoningContentBlock.h>
1112
#include <aws/core/utils/memory/stl/AWSString.h>
1213
#include <utility>
1314

@@ -79,6 +80,19 @@ namespace Model
7980
inline PostProcessingModelInvocationOutput& WithRawResponse(RawResponse&& value) { SetRawResponse(std::move(value)); return *this;}
8081
///@}
8182

83+
///@{
84+
/**
85+
* <p>Contains content about the reasoning that the model made during the
86+
* post-processing step.</p>
87+
*/
88+
inline const ReasoningContentBlock& GetReasoningContent() const{ return m_reasoningContent; }
89+
inline bool ReasoningContentHasBeenSet() const { return m_reasoningContentHasBeenSet; }
90+
inline void SetReasoningContent(const ReasoningContentBlock& value) { m_reasoningContentHasBeenSet = true; m_reasoningContent = value; }
91+
inline void SetReasoningContent(ReasoningContentBlock&& value) { m_reasoningContentHasBeenSet = true; m_reasoningContent = std::move(value); }
92+
inline PostProcessingModelInvocationOutput& WithReasoningContent(const ReasoningContentBlock& value) { SetReasoningContent(value); return *this;}
93+
inline PostProcessingModelInvocationOutput& WithReasoningContent(ReasoningContentBlock&& value) { SetReasoningContent(std::move(value)); return *this;}
94+
///@}
95+
8296
///@{
8397
/**
8498
* <p>The unique identifier of the trace.</p>
@@ -103,6 +117,9 @@ namespace Model
103117
RawResponse m_rawResponse;
104118
bool m_rawResponseHasBeenSet = false;
105119

120+
ReasoningContentBlock m_reasoningContent;
121+
bool m_reasoningContentHasBeenSet = false;
122+
106123
Aws::String m_traceId;
107124
bool m_traceIdHasBeenSet = false;
108125
};

generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/model/PreProcessingModelInvocationOutput.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <aws/bedrock-agent-runtime/model/Metadata.h>
99
#include <aws/bedrock-agent-runtime/model/PreProcessingParsedResponse.h>
1010
#include <aws/bedrock-agent-runtime/model/RawResponse.h>
11+
#include <aws/bedrock-agent-runtime/model/ReasoningContentBlock.h>
1112
#include <aws/core/utils/memory/stl/AWSString.h>
1213
#include <utility>
1314

@@ -79,6 +80,19 @@ namespace Model
7980
inline PreProcessingModelInvocationOutput& WithRawResponse(RawResponse&& value) { SetRawResponse(std::move(value)); return *this;}
8081
///@}
8182

83+
///@{
84+
/**
85+
* <p>Contains content about the reasoning that the model made during the
86+
* pre-processing step. </p>
87+
*/
88+
inline const ReasoningContentBlock& GetReasoningContent() const{ return m_reasoningContent; }
89+
inline bool ReasoningContentHasBeenSet() const { return m_reasoningContentHasBeenSet; }
90+
inline void SetReasoningContent(const ReasoningContentBlock& value) { m_reasoningContentHasBeenSet = true; m_reasoningContent = value; }
91+
inline void SetReasoningContent(ReasoningContentBlock&& value) { m_reasoningContentHasBeenSet = true; m_reasoningContent = std::move(value); }
92+
inline PreProcessingModelInvocationOutput& WithReasoningContent(const ReasoningContentBlock& value) { SetReasoningContent(value); return *this;}
93+
inline PreProcessingModelInvocationOutput& WithReasoningContent(ReasoningContentBlock&& value) { SetReasoningContent(std::move(value)); return *this;}
94+
///@}
95+
8296
///@{
8397
/**
8498
* <p>The unique identifier of the trace.</p>
@@ -103,6 +117,9 @@ namespace Model
103117
RawResponse m_rawResponse;
104118
bool m_rawResponseHasBeenSet = false;
105119

120+
ReasoningContentBlock m_reasoningContent;
121+
bool m_reasoningContentHasBeenSet = false;
122+
106123
Aws::String m_traceId;
107124
bool m_traceIdHasBeenSet = false;
108125
};

generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/model/PromptConfiguration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ namespace Model
102102
/**
103103
* <p>Specifies whether to override the default parser Lambda function when parsing
104104
* the raw foundation model output in the part of the agent sequence defined by the
105-
* <code>promptType</code>. If you set the field as <code>OVERRIDEN</code>, the
105+
* <code>promptType</code>. If you set the field as <code>OVERRIDDEN</code>, the
106106
* <code>overrideLambda</code> field in the <a
107107
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html">PromptOverrideConfiguration</a>
108108
* must be specified with the ARN of a Lambda function.</p>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8+
#include <aws/bedrock-agent-runtime/model/ReasoningTextBlock.h>
9+
#include <aws/core/utils/Array.h>
10+
#include <utility>
11+
12+
namespace Aws
13+
{
14+
namespace Utils
15+
{
16+
namespace Json
17+
{
18+
class JsonValue;
19+
class JsonView;
20+
} // namespace Json
21+
} // namespace Utils
22+
namespace BedrockAgentRuntime
23+
{
24+
namespace Model
25+
{
26+
27+
/**
28+
* <p>Contains content regarding the reasoning that the foundation model made with
29+
* respect to the content in the content block. Reasoning refers to a Chain of
30+
* Thought (CoT) that the model generates to enhance the accuracy of its final
31+
* response.</p><p><h3>See Also:</h3> <a
32+
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ReasoningContentBlock">AWS
33+
* API Reference</a></p>
34+
*/
35+
class ReasoningContentBlock
36+
{
37+
public:
38+
AWS_BEDROCKAGENTRUNTIME_API ReasoningContentBlock();
39+
AWS_BEDROCKAGENTRUNTIME_API ReasoningContentBlock(Aws::Utils::Json::JsonView jsonValue);
40+
AWS_BEDROCKAGENTRUNTIME_API ReasoningContentBlock& operator=(Aws::Utils::Json::JsonView jsonValue);
41+
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
42+
43+
44+
///@{
45+
/**
46+
* <p>Contains information about the reasoning that the model used to return the
47+
* content in the content block.</p>
48+
*/
49+
inline const ReasoningTextBlock& GetReasoningText() const{ return m_reasoningText; }
50+
inline bool ReasoningTextHasBeenSet() const { return m_reasoningTextHasBeenSet; }
51+
inline void SetReasoningText(const ReasoningTextBlock& value) { m_reasoningTextHasBeenSet = true; m_reasoningText = value; }
52+
inline void SetReasoningText(ReasoningTextBlock&& value) { m_reasoningTextHasBeenSet = true; m_reasoningText = std::move(value); }
53+
inline ReasoningContentBlock& WithReasoningText(const ReasoningTextBlock& value) { SetReasoningText(value); return *this;}
54+
inline ReasoningContentBlock& WithReasoningText(ReasoningTextBlock&& value) { SetReasoningText(std::move(value)); return *this;}
55+
///@}
56+
57+
///@{
58+
/**
59+
* <p>The content in the reasoning that was encrypted by the model provider for
60+
* trust and safety reasons.</p>
61+
*/
62+
inline const Aws::Utils::ByteBuffer& GetRedactedContent() const{ return m_redactedContent; }
63+
inline bool RedactedContentHasBeenSet() const { return m_redactedContentHasBeenSet; }
64+
inline void SetRedactedContent(const Aws::Utils::ByteBuffer& value) { m_redactedContentHasBeenSet = true; m_redactedContent = value; }
65+
inline void SetRedactedContent(Aws::Utils::ByteBuffer&& value) { m_redactedContentHasBeenSet = true; m_redactedContent = std::move(value); }
66+
inline ReasoningContentBlock& WithRedactedContent(const Aws::Utils::ByteBuffer& value) { SetRedactedContent(value); return *this;}
67+
inline ReasoningContentBlock& WithRedactedContent(Aws::Utils::ByteBuffer&& value) { SetRedactedContent(std::move(value)); return *this;}
68+
///@}
69+
private:
70+
71+
ReasoningTextBlock m_reasoningText;
72+
bool m_reasoningTextHasBeenSet = false;
73+
74+
Aws::Utils::ByteBuffer m_redactedContent;
75+
bool m_redactedContentHasBeenSet = false;
76+
};
77+
78+
} // namespace Model
79+
} // namespace BedrockAgentRuntime
80+
} // namespace Aws
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8+
#include <aws/core/utils/memory/stl/AWSString.h>
9+
#include <utility>
10+
11+
namespace Aws
12+
{
13+
namespace Utils
14+
{
15+
namespace Json
16+
{
17+
class JsonValue;
18+
class JsonView;
19+
} // namespace Json
20+
} // namespace Utils
21+
namespace BedrockAgentRuntime
22+
{
23+
namespace Model
24+
{
25+
26+
/**
27+
* <p>Contains information about the reasoning that the model used to return the
28+
* content in the content block.</p><p><h3>See Also:</h3> <a
29+
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ReasoningTextBlock">AWS
30+
* API Reference</a></p>
31+
*/
32+
class ReasoningTextBlock
33+
{
34+
public:
35+
AWS_BEDROCKAGENTRUNTIME_API ReasoningTextBlock();
36+
AWS_BEDROCKAGENTRUNTIME_API ReasoningTextBlock(Aws::Utils::Json::JsonView jsonValue);
37+
AWS_BEDROCKAGENTRUNTIME_API ReasoningTextBlock& operator=(Aws::Utils::Json::JsonView jsonValue);
38+
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
39+
40+
41+
///@{
42+
/**
43+
* <p>A hash of all the messages in the conversation to ensure that the content in
44+
* the reasoning text block isn't tampered with. You must submit the signature in
45+
* subsequent <code>Converse</code> requests, in addition to the previous messages.
46+
* If the previous messages are tampered with, the response throws an error.</p>
47+
*/
48+
inline const Aws::String& GetSignature() const{ return m_signature; }
49+
inline bool SignatureHasBeenSet() const { return m_signatureHasBeenSet; }
50+
inline void SetSignature(const Aws::String& value) { m_signatureHasBeenSet = true; m_signature = value; }
51+
inline void SetSignature(Aws::String&& value) { m_signatureHasBeenSet = true; m_signature = std::move(value); }
52+
inline void SetSignature(const char* value) { m_signatureHasBeenSet = true; m_signature.assign(value); }
53+
inline ReasoningTextBlock& WithSignature(const Aws::String& value) { SetSignature(value); return *this;}
54+
inline ReasoningTextBlock& WithSignature(Aws::String&& value) { SetSignature(std::move(value)); return *this;}
55+
inline ReasoningTextBlock& WithSignature(const char* value) { SetSignature(value); return *this;}
56+
///@}
57+
58+
///@{
59+
/**
60+
* <p>Text describing the reasoning that the model used to return the content in
61+
* the content block.</p>
62+
*/
63+
inline const Aws::String& GetText() const{ return m_text; }
64+
inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
65+
inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; }
66+
inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); }
67+
inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); }
68+
inline ReasoningTextBlock& WithText(const Aws::String& value) { SetText(value); return *this;}
69+
inline ReasoningTextBlock& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;}
70+
inline ReasoningTextBlock& WithText(const char* value) { SetText(value); return *this;}
71+
///@}
72+
private:
73+
74+
Aws::String m_signature;
75+
bool m_signatureHasBeenSet = false;
76+
77+
Aws::String m_text;
78+
bool m_textHasBeenSet = false;
79+
};
80+
81+
} // namespace Model
82+
} // namespace BedrockAgentRuntime
83+
} // namespace Aws

generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/model/OrchestrationModelInvocationOutput.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Model
2121
OrchestrationModelInvocationOutput::OrchestrationModelInvocationOutput() :
2222
m_metadataHasBeenSet(false),
2323
m_rawResponseHasBeenSet(false),
24+
m_reasoningContentHasBeenSet(false),
2425
m_traceIdHasBeenSet(false)
2526
{
2627
}
@@ -47,6 +48,13 @@ OrchestrationModelInvocationOutput& OrchestrationModelInvocationOutput::operator
4748
m_rawResponseHasBeenSet = true;
4849
}
4950

51+
if(jsonValue.ValueExists("reasoningContent"))
52+
{
53+
m_reasoningContent = jsonValue.GetObject("reasoningContent");
54+
55+
m_reasoningContentHasBeenSet = true;
56+
}
57+
5058
if(jsonValue.ValueExists("traceId"))
5159
{
5260
m_traceId = jsonValue.GetString("traceId");
@@ -73,6 +81,12 @@ JsonValue OrchestrationModelInvocationOutput::Jsonize() const
7381

7482
}
7583

84+
if(m_reasoningContentHasBeenSet)
85+
{
86+
payload.WithObject("reasoningContent", m_reasoningContent.Jsonize());
87+
88+
}
89+
7690
if(m_traceIdHasBeenSet)
7791
{
7892
payload.WithString("traceId", m_traceId);

generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/model/PostProcessingModelInvocationOutput.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PostProcessingModelInvocationOutput::PostProcessingModelInvocationOutput() :
2222
m_metadataHasBeenSet(false),
2323
m_parsedResponseHasBeenSet(false),
2424
m_rawResponseHasBeenSet(false),
25+
m_reasoningContentHasBeenSet(false),
2526
m_traceIdHasBeenSet(false)
2627
{
2728
}
@@ -55,6 +56,13 @@ PostProcessingModelInvocationOutput& PostProcessingModelInvocationOutput::operat
5556
m_rawResponseHasBeenSet = true;
5657
}
5758

59+
if(jsonValue.ValueExists("reasoningContent"))
60+
{
61+
m_reasoningContent = jsonValue.GetObject("reasoningContent");
62+
63+
m_reasoningContentHasBeenSet = true;
64+
}
65+
5866
if(jsonValue.ValueExists("traceId"))
5967
{
6068
m_traceId = jsonValue.GetString("traceId");
@@ -87,6 +95,12 @@ JsonValue PostProcessingModelInvocationOutput::Jsonize() const
8795

8896
}
8997

98+
if(m_reasoningContentHasBeenSet)
99+
{
100+
payload.WithObject("reasoningContent", m_reasoningContent.Jsonize());
101+
102+
}
103+
90104
if(m_traceIdHasBeenSet)
91105
{
92106
payload.WithString("traceId", m_traceId);

generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/model/PreProcessingModelInvocationOutput.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PreProcessingModelInvocationOutput::PreProcessingModelInvocationOutput() :
2222
m_metadataHasBeenSet(false),
2323
m_parsedResponseHasBeenSet(false),
2424
m_rawResponseHasBeenSet(false),
25+
m_reasoningContentHasBeenSet(false),
2526
m_traceIdHasBeenSet(false)
2627
{
2728
}
@@ -55,6 +56,13 @@ PreProcessingModelInvocationOutput& PreProcessingModelInvocationOutput::operator
5556
m_rawResponseHasBeenSet = true;
5657
}
5758

59+
if(jsonValue.ValueExists("reasoningContent"))
60+
{
61+
m_reasoningContent = jsonValue.GetObject("reasoningContent");
62+
63+
m_reasoningContentHasBeenSet = true;
64+
}
65+
5866
if(jsonValue.ValueExists("traceId"))
5967
{
6068
m_traceId = jsonValue.GetString("traceId");
@@ -87,6 +95,12 @@ JsonValue PreProcessingModelInvocationOutput::Jsonize() const
8795

8896
}
8997

98+
if(m_reasoningContentHasBeenSet)
99+
{
100+
payload.WithObject("reasoningContent", m_reasoningContent.Jsonize());
101+
102+
}
103+
90104
if(m_traceIdHasBeenSet)
91105
{
92106
payload.WithString("traceId", m_traceId);

0 commit comments

Comments
 (0)