Skip to content

Commit bd478a6

Browse files
Add support for system tool and web citation response.
1 parent d8631da commit bd478a6

Some content is hidden

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

47 files changed

+1107
-196
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.678
1+
1.11.679

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ namespace Model {
1818

1919
/**
2020
* <p>The model must request at least one tool (no text is generated). For example,
21-
* <code>{"any" : {}}</code>.</p><p><h3>See Also:</h3> <a
21+
* <code>{"any" : {}}</code>. For more information, see <a
22+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a
23+
* tool with the Converse API</a> in the Amazon Bedrock User Guide.</p><p><h3>See
24+
* Also:</h3> <a
2225
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/AnyToolChoice">AWS
2326
* API Reference</a></p>
2427
*/

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ namespace Model {
1818

1919
/**
2020
* <p>The Model automatically decides if a tool should be called or whether to
21-
* generate text instead. For example, <code>{"auto" : {}}</code>.</p><p><h3>See
21+
* generate text instead. For example, <code>{"auto" : {}}</code>. For more
22+
* information, see <a
23+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a
24+
* tool with the Converse API</a> in the Amazon Bedrock User Guide</p><p><h3>See
2225
* Also:</h3> <a
2326
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/AutoToolChoice">AWS
2427
* API Reference</a></p>

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <aws/bedrock-runtime/model/DocumentCharLocation.h>
99
#include <aws/bedrock-runtime/model/DocumentChunkLocation.h>
1010
#include <aws/bedrock-runtime/model/DocumentPageLocation.h>
11+
#include <aws/bedrock-runtime/model/WebLocation.h>
1112

1213
#include <utility>
1314

@@ -36,6 +37,24 @@ class CitationLocation {
3637
AWS_BEDROCKRUNTIME_API CitationLocation& operator=(Aws::Utils::Json::JsonView jsonValue);
3738
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
3839

40+
///@{
41+
/**
42+
* <p>The web URL that was cited for this reference.</p>
43+
*/
44+
inline const WebLocation& GetWeb() const { return m_web; }
45+
inline bool WebHasBeenSet() const { return m_webHasBeenSet; }
46+
template <typename WebT = WebLocation>
47+
void SetWeb(WebT&& value) {
48+
m_webHasBeenSet = true;
49+
m_web = std::forward<WebT>(value);
50+
}
51+
template <typename WebT = WebLocation>
52+
CitationLocation& WithWeb(WebT&& value) {
53+
SetWeb(std::forward<WebT>(value));
54+
return *this;
55+
}
56+
///@}
57+
3958
///@{
4059
/**
4160
* <p>The character-level location within the document where the cited content is
@@ -94,6 +113,9 @@ class CitationLocation {
94113
}
95114
///@}
96115
private:
116+
WebLocation m_web;
117+
bool m_webHasBeenSet = false;
118+
97119
DocumentCharLocation m_documentChar;
98120
bool m_documentCharHasBeenSet = false;
99121

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class CitationsConfig {
3333

3434
///@{
3535
/**
36-
* <p>Specifies whether document citations should be included in the model's
37-
* response. When set to true, the model can generate citations that reference the
38-
* source documents used to inform the response.</p>
36+
* <p>Specifies whether citations from the selected document should be used in the
37+
* model's response. When set to true, the model can generate citations that
38+
* reference the source documents used to inform the response.</p>
3939
*/
4040
inline bool GetEnabled() const { return m_enabled; }
4141
inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class ContentBlock {
160160
* <code>guardContent</code> in a call to the Converse API, the guardrail (if
161161
* passed in the Converse API) assesses the entire message.</p> <p>For more
162162
* information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon
163-
* Bedrock User Guide</i>. </p>
163+
* Bedrock User Guide</i>.</p>
164164
*/
165165
inline const GuardrailConverseContentBlock& GetGuardContent() const { return m_guardContent; }
166166
inline bool GuardContentHasBeenSet() const { return m_guardContentHasBeenSet; }

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
88
#include <aws/bedrock-runtime/model/CitationsDelta.h>
99
#include <aws/bedrock-runtime/model/ReasoningContentBlockDelta.h>
10+
#include <aws/bedrock-runtime/model/ToolResultBlockDelta.h>
1011
#include <aws/bedrock-runtime/model/ToolUseBlockDelta.h>
1112
#include <aws/core/utils/memory/stl/AWSString.h>
13+
#include <aws/core/utils/memory/stl/AWSVector.h>
1214

1315
#include <utility>
1416

@@ -70,6 +72,30 @@ class ContentBlockDelta {
7072
}
7173
///@}
7274

75+
///@{
76+
/**
77+
* <p>An incremental update that contains the results from a tool call.</p>
78+
*/
79+
inline const Aws::Vector<ToolResultBlockDelta>& GetToolResult() const { return m_toolResult; }
80+
inline bool ToolResultHasBeenSet() const { return m_toolResultHasBeenSet; }
81+
template <typename ToolResultT = Aws::Vector<ToolResultBlockDelta>>
82+
void SetToolResult(ToolResultT&& value) {
83+
m_toolResultHasBeenSet = true;
84+
m_toolResult = std::forward<ToolResultT>(value);
85+
}
86+
template <typename ToolResultT = Aws::Vector<ToolResultBlockDelta>>
87+
ContentBlockDelta& WithToolResult(ToolResultT&& value) {
88+
SetToolResult(std::forward<ToolResultT>(value));
89+
return *this;
90+
}
91+
template <typename ToolResultT = ToolResultBlockDelta>
92+
ContentBlockDelta& AddToolResult(ToolResultT&& value) {
93+
m_toolResultHasBeenSet = true;
94+
m_toolResult.emplace_back(std::forward<ToolResultT>(value));
95+
return *this;
96+
}
97+
///@}
98+
7399
///@{
74100
/**
75101
* <p>Contains content regarding the reasoning that is carried out by the model.
@@ -115,6 +141,9 @@ class ContentBlockDelta {
115141
ToolUseBlockDelta m_toolUse;
116142
bool m_toolUseHasBeenSet = false;
117143

144+
Aws::Vector<ToolResultBlockDelta> m_toolResult;
145+
bool m_toolResultHasBeenSet = false;
146+
118147
ReasoningContentBlockDelta m_reasoningContent;
119148
bool m_reasoningContentHasBeenSet = false;
120149

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#pragma once
77
#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8+
#include <aws/bedrock-runtime/model/ToolResultBlockStart.h>
89
#include <aws/bedrock-runtime/model/ToolUseBlockStart.h>
910

1011
#include <utility>
@@ -48,9 +49,30 @@ class ContentBlockStart {
4849
return *this;
4950
}
5051
///@}
52+
53+
///@{
54+
/**
55+
* <p>The </p>
56+
*/
57+
inline const ToolResultBlockStart& GetToolResult() const { return m_toolResult; }
58+
inline bool ToolResultHasBeenSet() const { return m_toolResultHasBeenSet; }
59+
template <typename ToolResultT = ToolResultBlockStart>
60+
void SetToolResult(ToolResultT&& value) {
61+
m_toolResultHasBeenSet = true;
62+
m_toolResult = std::forward<ToolResultT>(value);
63+
}
64+
template <typename ToolResultT = ToolResultBlockStart>
65+
ContentBlockStart& WithToolResult(ToolResultT&& value) {
66+
SetToolResult(std::forward<ToolResultT>(value));
67+
return *this;
68+
}
69+
///@}
5170
private:
5271
ToolUseBlockStart m_toolUse;
5372
bool m_toolUseHasBeenSet = false;
73+
74+
ToolResultBlockStart m_toolResult;
75+
bool m_toolResultHasBeenSet = false;
5476
};
5577

5678
} // namespace Model

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class ConverseStreamOutput {
186186
* <p>The input fails to satisfy the constraints specified by <i>Amazon
187187
* Bedrock</i>. For troubleshooting this error, see <a
188188
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a>
189-
* in the Amazon Bedrock User Guide</p>
189+
* in the Amazon Bedrock User Guide.</p>
190190
*/
191191
inline const BedrockRuntimeError& GetValidationException() const { return m_validationException; }
192192
inline bool ValidationExceptionHasBeenSet() const { return m_validationExceptionHasBeenSet; }
@@ -207,7 +207,7 @@ class ConverseStreamOutput {
207207
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon
208208
* Bedrock</i>. For troubleshooting this error, see <a
209209
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a>
210-
* in the Amazon Bedrock User Guide</p>
210+
* in the Amazon Bedrock User Guide.</p>
211211
*/
212212
inline const BedrockRuntimeError& GetThrottlingException() const { return m_throttlingException; }
213213
inline bool ThrottlingExceptionHasBeenSet() const { return m_throttlingExceptionHasBeenSet; }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace Model {
2222

2323
/**
2424
* <p>The trace object in a response from <a
25-
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>.
26-
* Currently, you can only trace guardrails.</p><p><h3>See Also:</h3> <a
25+
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>.</p><p><h3>See
26+
* Also:</h3> <a
2727
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamTrace">AWS
2828
* API Reference</a></p>
2929
*/

0 commit comments

Comments
 (0)