Skip to content

Commit dc3d322

Browse files
Custom Orchestration and Streaming configurations API release for AWSBedrockAgents.
1 parent 6aed062 commit dc3d322

14 files changed

+656
-2
lines changed

generator/ServiceModels/bedrock-agent-runtime/bedrock-agent-runtime-2023-07-26.api.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,21 @@
494494
"type":"string",
495495
"enum":["RETURN_CONTROL"]
496496
},
497+
"CustomOrchestrationTrace":{
498+
"type":"structure",
499+
"members":{
500+
"event":{"shape":"CustomOrchestrationTraceEvent"},
501+
"traceId":{"shape":"TraceId"}
502+
},
503+
"sensitive":true
504+
},
505+
"CustomOrchestrationTraceEvent":{
506+
"type":"structure",
507+
"members":{
508+
"text":{"shape":"String"}
509+
},
510+
"sensitive":true
511+
},
497512
"DateTimestamp":{
498513
"type":"timestamp",
499514
"timestampFormat":"iso8601"
@@ -1509,7 +1524,8 @@
15091524
"location":"uri",
15101525
"locationName":"sessionId"
15111526
},
1512-
"sessionState":{"shape":"SessionState"}
1527+
"sessionState":{"shape":"SessionState"},
1528+
"streamingConfigurations":{"shape":"StreamingConfigurations"}
15131529
}
15141530
},
15151531
"InvokeAgentResponse":{
@@ -2618,6 +2634,18 @@
26182634
"max":4,
26192635
"min":0
26202636
},
2637+
"StreamingConfigurations":{
2638+
"type":"structure",
2639+
"members":{
2640+
"applyGuardrailInterval":{"shape":"StreamingConfigurationsApplyGuardrailIntervalInteger"},
2641+
"streamFinalResponse":{"shape":"Boolean"}
2642+
}
2643+
},
2644+
"StreamingConfigurationsApplyGuardrailIntervalInteger":{
2645+
"type":"integer",
2646+
"box":true,
2647+
"min":1
2648+
},
26212649
"String":{"type":"string"},
26222650
"SummaryText":{
26232651
"type":"string",
@@ -2692,6 +2720,7 @@
26922720
"Trace":{
26932721
"type":"structure",
26942722
"members":{
2723+
"customOrchestrationTrace":{"shape":"CustomOrchestrationTrace"},
26952724
"failureTrace":{"shape":"FailureTrace"},
26962725
"guardrailTrace":{"shape":"GuardrailTrace"},
26972726
"orchestrationTrace":{"shape":"OrchestrationTrace"},

generator/ServiceModels/bedrock-agent-runtime/bedrock-agent-runtime-2023-07-26.docs.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@
215215
"InvokeInlineAgentRequest$enableTrace": "<p> Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html\">Using trace</a>. <pre><code> &lt;/p&gt; </code></pre>",
216216
"InvokeInlineAgentRequest$endSession": "<p> Specifies whether to end the session with the inline agent or not. </p>",
217217
"ParameterDetail$required": "<p> Whether the parameter is required for the agent to complete the function for action group invocation. </p>",
218-
"PreProcessingParsedResponse$isValid": "<p>Whether the user input is valid or not. If <code>false</code>, the agent doesn't proceed to orchestration.</p>"
218+
"PreProcessingParsedResponse$isValid": "<p>Whether the user input is valid or not. If <code>false</code>, the agent doesn't proceed to orchestration.</p>",
219+
"StreamingConfigurations$streamFinalResponse": "<p> Specifies whether to enable streaming for the final response. This is set to <code>false</code> by default. </p>"
219220
}
220221
},
221222
"ByteContentBlob": {
@@ -310,6 +311,18 @@
310311
"ActionGroupExecutor$customControl": "<p> To return the action group invocation results directly in the <code>InvokeInlineAgent</code> response, specify <code>RETURN_CONTROL</code>. </p>"
311312
}
312313
},
314+
"CustomOrchestrationTrace": {
315+
"base": "<p> The trace behavior for the custom orchestration. </p>",
316+
"refs": {
317+
"Trace$customOrchestrationTrace": "<p> Details about the custom orchestration step in which the agent determines the order in which actions are executed. </p>"
318+
}
319+
},
320+
"CustomOrchestrationTraceEvent": {
321+
"base": "<p> The event in the custom orchestration sequence. </p>",
322+
"refs": {
323+
"CustomOrchestrationTrace$event": "<p> The trace event details used with the custom orchestration. </p>"
324+
}
325+
},
313326
"DateTimestamp": {
314327
"base": "<p>Time Stamp.</p>",
315328
"refs": {
@@ -1963,6 +1976,18 @@
19631976
"InferenceConfiguration$stopSequences": "<p>A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.</p>"
19641977
}
19651978
},
1979+
"StreamingConfigurations": {
1980+
"base": "<p> Configurations for streaming. </p>",
1981+
"refs": {
1982+
"InvokeAgentRequest$streamingConfigurations": "<p> Specifies the configurations for streaming. </p>"
1983+
}
1984+
},
1985+
"StreamingConfigurationsApplyGuardrailIntervalInteger": {
1986+
"base": null,
1987+
"refs": {
1988+
"StreamingConfigurations$applyGuardrailInterval": "<p> The guardrail interval to apply as response is generated. </p>"
1989+
}
1990+
},
19661991
"String": {
19671992
"base": null,
19681993
"refs": {
@@ -1981,6 +2006,7 @@
19812006
"CodeInterpreterInvocationOutput$executionOutput": "<p>Contains the successful output returned from code execution</p>",
19822007
"ContentBody$body": "<p>The body of the API response.</p>",
19832008
"ContentMap$key": null,
2009+
"CustomOrchestrationTraceEvent$text": "<p> The text that prompted the event at this step. </p>",
19842010
"Files$member": null,
19852011
"FlowTraceCondition$conditionName": "<p>The name of the condition.</p>",
19862012
"FunctionInvocationInput$actionGroup": "<p>The action group that the function belongs to.</p>",
@@ -2100,6 +2126,7 @@
21002126
"TraceId": {
21012127
"base": null,
21022128
"refs": {
2129+
"CustomOrchestrationTrace$traceId": "<p> The unique identifier of the trace. </p>",
21032130
"FailureTrace$traceId": "<p>The unique identifier of the trace.</p>",
21042131
"GuardrailTrace$traceId": "<p>The details of the trace Id used in the Guardrail Trace.</p>",
21052132
"InvocationInput$traceId": "<p>The unique identifier of the trace.</p>",

generator/ServiceModels/bedrock-agent-runtime/bedrock-agent-runtime-2023-07-26.normal.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,32 @@
681681
"type":"string",
682682
"enum":["RETURN_CONTROL"]
683683
},
684+
"CustomOrchestrationTrace":{
685+
"type":"structure",
686+
"members":{
687+
"event":{
688+
"shape":"CustomOrchestrationTraceEvent",
689+
"documentation":"<p> The trace event details used with the custom orchestration. </p>"
690+
},
691+
"traceId":{
692+
"shape":"TraceId",
693+
"documentation":"<p> The unique identifier of the trace. </p>"
694+
}
695+
},
696+
"documentation":"<p> The trace behavior for the custom orchestration. </p>",
697+
"sensitive":true
698+
},
699+
"CustomOrchestrationTraceEvent":{
700+
"type":"structure",
701+
"members":{
702+
"text":{
703+
"shape":"String",
704+
"documentation":"<p> The text that prompted the event at this step. </p>"
705+
}
706+
},
707+
"documentation":"<p> The event in the custom orchestration sequence. </p>",
708+
"sensitive":true
709+
},
684710
"DateTimestamp":{
685711
"type":"timestamp",
686712
"documentation":"<p>Time Stamp.</p>",
@@ -2279,6 +2305,10 @@
22792305
"sessionState":{
22802306
"shape":"SessionState",
22812307
"documentation":"<p>Contains parameters that specify various attributes of the session. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html\">Control session context</a>.</p> <note> <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p> </note>"
2308+
},
2309+
"streamingConfigurations":{
2310+
"shape":"StreamingConfigurations",
2311+
"documentation":"<p> Specifies the configurations for streaming. </p>"
22822312
}
22832313
}
22842314
},
@@ -4064,6 +4094,25 @@
40644094
"max":4,
40654095
"min":0
40664096
},
4097+
"StreamingConfigurations":{
4098+
"type":"structure",
4099+
"members":{
4100+
"applyGuardrailInterval":{
4101+
"shape":"StreamingConfigurationsApplyGuardrailIntervalInteger",
4102+
"documentation":"<p> The guardrail interval to apply as response is generated. </p>"
4103+
},
4104+
"streamFinalResponse":{
4105+
"shape":"Boolean",
4106+
"documentation":"<p> Specifies whether to enable streaming for the final response. This is set to <code>false</code> by default. </p>"
4107+
}
4108+
},
4109+
"documentation":"<p> Configurations for streaming. </p>"
4110+
},
4111+
"StreamingConfigurationsApplyGuardrailIntervalInteger":{
4112+
"type":"integer",
4113+
"box":true,
4114+
"min":1
4115+
},
40674116
"String":{"type":"string"},
40684117
"SummaryText":{
40694118
"type":"string",
@@ -4163,6 +4212,10 @@
41634212
"Trace":{
41644213
"type":"structure",
41654214
"members":{
4215+
"customOrchestrationTrace":{
4216+
"shape":"CustomOrchestrationTrace",
4217+
"documentation":"<p> Details about the custom orchestration step in which the agent determines the order in which actions are executed. </p>"
4218+
},
41664219
"failureTrace":{
41674220
"shape":"FailureTrace",
41684221
"documentation":"<p>Contains information about the failure of the interaction.</p>"

sdk/code-analysis/ServiceAnalysis/BedrockAgentRuntime/Generated/PropertyValueRules.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@
218218
<min>1</min>
219219
<max>10485760</max>
220220
</property-value-rule>
221+
<property-value-rule>
222+
<property>Amazon.BedrockAgentRuntime.Model.CustomOrchestrationTrace.TraceId</property>
223+
<min>2</min>
224+
<max>16</max>
225+
</property-value-rule>
221226
<property-value-rule>
222227
<property>Amazon.BedrockAgentRuntime.Model.DependencyFailedException.ResourceName</property>
223228
<pattern>^[\s\S]*$</pattern>
@@ -503,6 +508,10 @@
503508
<property>Amazon.BedrockAgentRuntime.Model.Span.Start</property>
504509
<min>0</min>
505510
</property-value-rule>
511+
<property-value-rule>
512+
<property>Amazon.BedrockAgentRuntime.Model.StreamingConfigurations.ApplyGuardrailInterval</property>
513+
<min>1</min>
514+
</property-value-rule>
506515
<property-value-rule>
507516
<property>Amazon.BedrockAgentRuntime.Model.TextInferenceConfig.MaxTokens</property>
508517
<min>0</min>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the bedrock-agent-runtime-2023-07-26.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.BedrockAgentRuntime.Model
31+
{
32+
/// <summary>
33+
/// The trace behavior for the custom orchestration.
34+
/// </summary>
35+
public partial class CustomOrchestrationTrace
36+
{
37+
private CustomOrchestrationTraceEvent _event;
38+
private string _traceId;
39+
40+
/// <summary>
41+
/// Gets and sets the property Event.
42+
/// <para>
43+
/// The trace event details used with the custom orchestration.
44+
/// </para>
45+
/// </summary>
46+
[AWSProperty(Sensitive=true)]
47+
public CustomOrchestrationTraceEvent Event
48+
{
49+
get { return this._event; }
50+
set { this._event = value; }
51+
}
52+
53+
// Check to see if Event property is set
54+
internal bool IsSetEvent()
55+
{
56+
return this._event != null;
57+
}
58+
59+
/// <summary>
60+
/// Gets and sets the property TraceId.
61+
/// <para>
62+
/// The unique identifier of the trace.
63+
/// </para>
64+
/// </summary>
65+
[AWSProperty(Min=2, Max=16)]
66+
public string TraceId
67+
{
68+
get { return this._traceId; }
69+
set { this._traceId = value; }
70+
}
71+
72+
// Check to see if TraceId property is set
73+
internal bool IsSetTraceId()
74+
{
75+
return this._traceId != null;
76+
}
77+
78+
}
79+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the bedrock-agent-runtime-2023-07-26.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.BedrockAgentRuntime.Model
31+
{
32+
/// <summary>
33+
/// The event in the custom orchestration sequence.
34+
/// </summary>
35+
public partial class CustomOrchestrationTraceEvent
36+
{
37+
private string _text;
38+
39+
/// <summary>
40+
/// Gets and sets the property Text.
41+
/// <para>
42+
/// The text that prompted the event at this step.
43+
/// </para>
44+
/// </summary>
45+
public string Text
46+
{
47+
get { return this._text; }
48+
set { this._text = value; }
49+
}
50+
51+
// Check to see if Text property is set
52+
internal bool IsSetText()
53+
{
54+
return this._text != null;
55+
}
56+
57+
}
58+
}

0 commit comments

Comments
 (0)