@aws-sdk/client-bedrock-agent-runtime 3.895.0 → 3.898.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.
@@ -1,5 +1,20 @@
1
1
  import { SENSITIVE_STRING } from "@smithy/smithy-client";
2
- import { AgentActionGroupFilterSensitiveLog, CitationEventFilterSensitiveLog, CollaboratorConfigurationFilterSensitiveLog, ConversationHistoryFilterSensitiveLog, ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog, GenerationConfigurationFilterSensitiveLog, ImplicitFilterConfigurationFilterSensitiveLog, InlineSessionStateFilterSensitiveLog, InputFileFilterSensitiveLog, InvocationResultMemberFilterSensitiveLog, OrchestrationConfigurationFilterSensitiveLog, VectorSearchRerankingConfigurationFilterSensitiveLog, } from "./models_0";
2
+ import { AgentActionGroupFilterSensitiveLog, ByteContentDocFilterSensitiveLog, CitationFilterSensitiveLog, CollaboratorConfigurationFilterSensitiveLog, ConversationHistoryFilterSensitiveLog, ExternalSourcesGenerationConfigurationFilterSensitiveLog, GeneratedResponsePartFilterSensitiveLog, ImplicitFilterConfigurationFilterSensitiveLog, InlineSessionStateFilterSensitiveLog, InputFileFilterSensitiveLog, InvocationResultMemberFilterSensitiveLog, PromptTemplateFilterSensitiveLog, RetrievedReferenceFilterSensitiveLog, VectorSearchRerankingConfigurationFilterSensitiveLog, } from "./models_0";
3
+ export const ExternalSourceType = {
4
+ BYTE_CONTENT: "BYTE_CONTENT",
5
+ S3: "S3",
6
+ };
7
+ export const QueryTransformationType = {
8
+ QUERY_DECOMPOSITION: "QUERY_DECOMPOSITION",
9
+ };
10
+ export const RetrieveAndGenerateType = {
11
+ EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
12
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
13
+ };
14
+ export const GuadrailAction = {
15
+ INTERVENED: "INTERVENED",
16
+ NONE: "NONE",
17
+ };
3
18
  export var RetrieveAndGenerateStreamResponseOutput;
4
19
  (function (RetrieveAndGenerateStreamResponseOutput) {
5
20
  RetrieveAndGenerateStreamResponseOutput.visit = (value, visitor) => {
@@ -101,6 +116,43 @@ export var RetrievalFilter;
101
116
  return visitor._(value.$unknown[0], value.$unknown[1]);
102
117
  };
103
118
  })(RetrievalFilter || (RetrievalFilter = {}));
119
+ export const ExternalSourceFilterSensitiveLog = (obj) => ({
120
+ ...obj,
121
+ ...(obj.byteContent && { byteContent: ByteContentDocFilterSensitiveLog(obj.byteContent) }),
122
+ });
123
+ export const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
124
+ ...obj,
125
+ ...(obj.sources && { sources: obj.sources.map((item) => ExternalSourceFilterSensitiveLog(item)) }),
126
+ ...(obj.generationConfiguration && {
127
+ generationConfiguration: ExternalSourcesGenerationConfigurationFilterSensitiveLog(obj.generationConfiguration),
128
+ }),
129
+ });
130
+ export const GenerationConfigurationFilterSensitiveLog = (obj) => ({
131
+ ...obj,
132
+ ...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
133
+ });
134
+ export const OrchestrationConfigurationFilterSensitiveLog = (obj) => ({
135
+ ...obj,
136
+ ...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
137
+ });
138
+ export const RetrieveAndGenerateOutputFilterSensitiveLog = (obj) => ({
139
+ ...obj,
140
+ });
141
+ export const RetrieveAndGenerateResponseFilterSensitiveLog = (obj) => ({
142
+ ...obj,
143
+ ...(obj.output && { output: SENSITIVE_STRING }),
144
+ ...(obj.citations && { citations: obj.citations.map((item) => CitationFilterSensitiveLog(item)) }),
145
+ });
146
+ export const CitationEventFilterSensitiveLog = (obj) => ({
147
+ ...obj,
148
+ ...(obj.citation && { citation: CitationFilterSensitiveLog(obj.citation) }),
149
+ ...(obj.generatedResponsePart && {
150
+ generatedResponsePart: GeneratedResponsePartFilterSensitiveLog(obj.generatedResponsePart),
151
+ }),
152
+ ...(obj.retrievedReferences && {
153
+ retrievedReferences: obj.retrievedReferences.map((item) => RetrievedReferenceFilterSensitiveLog(item)),
154
+ }),
155
+ });
104
156
  export const RetrieveAndGenerateOutputEventFilterSensitiveLog = (obj) => ({
105
157
  ...obj,
106
158
  });
@@ -2080,6 +2080,14 @@ const de_AgentCollaboratorInvocationOutput = (output, context) => {
2080
2080
  output: _json,
2081
2081
  });
2082
2082
  };
2083
+ const de_AgentTraces = (output, context) => {
2084
+ const retVal = (output || [])
2085
+ .filter((e) => e != null)
2086
+ .map((entry) => {
2087
+ return de_TracePart(entry, context);
2088
+ });
2089
+ return retVal;
2090
+ };
2083
2091
  const de_ApiResult = (output, context) => {
2084
2092
  return take(output, {
2085
2093
  actionGroup: __expectString,
@@ -2207,6 +2215,16 @@ const de_FlowExecutionEvent = (output, context) => {
2207
2215
  flowOutputEvent: de_FlowExecutionOutputEvent(output.flowOutputEvent, context),
2208
2216
  };
2209
2217
  }
2218
+ if (output.nodeActionEvent != null) {
2219
+ return {
2220
+ nodeActionEvent: de_NodeActionEvent(output.nodeActionEvent, context),
2221
+ };
2222
+ }
2223
+ if (output.nodeDependencyEvent != null) {
2224
+ return {
2225
+ nodeDependencyEvent: de_NodeDependencyEvent(output.nodeDependencyEvent, context),
2226
+ };
2227
+ }
2210
2228
  if (output.nodeFailureEvent != null) {
2211
2229
  return {
2212
2230
  nodeFailureEvent: de_NodeFailureEvent(output.nodeFailureEvent, context),
@@ -2341,6 +2359,11 @@ const de_FlowTrace = (output, context) => {
2341
2359
  nodeActionTrace: de_FlowTraceNodeActionEvent(output.nodeActionTrace, context),
2342
2360
  };
2343
2361
  }
2362
+ if (output.nodeDependencyTrace != null) {
2363
+ return {
2364
+ nodeDependencyTrace: de_FlowTraceDependencyEvent(output.nodeDependencyTrace, context),
2365
+ };
2366
+ }
2344
2367
  if (output.nodeInputTrace != null) {
2345
2368
  return {
2346
2369
  nodeInputTrace: de_FlowTraceNodeInputEvent(output.nodeInputTrace, context),
@@ -2360,6 +2383,13 @@ const de_FlowTraceConditionNodeResultEvent = (output, context) => {
2360
2383
  timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2361
2384
  });
2362
2385
  };
2386
+ const de_FlowTraceDependencyEvent = (output, context) => {
2387
+ return take(output, {
2388
+ nodeName: __expectString,
2389
+ timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2390
+ traceElements: (_) => de_TraceElements(__expectUnion(_), context),
2391
+ });
2392
+ };
2363
2393
  const de_FlowTraceEvent = (output, context) => {
2364
2394
  return take(output, {
2365
2395
  trace: (_) => de_FlowTrace(__expectUnion(_), context),
@@ -2369,6 +2399,8 @@ const de_FlowTraceNodeActionEvent = (output, context) => {
2369
2399
  return take(output, {
2370
2400
  nodeName: __expectString,
2371
2401
  operationName: __expectString,
2402
+ operationRequest: (_) => de_Document(_, context),
2403
+ operationResponse: (_) => de_Document(_, context),
2372
2404
  requestId: __expectString,
2373
2405
  serviceName: __expectString,
2374
2406
  timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
@@ -2391,8 +2423,12 @@ const de_FlowTraceNodeInputEvent = (output, context) => {
2391
2423
  };
2392
2424
  const de_FlowTraceNodeInputField = (output, context) => {
2393
2425
  return take(output, {
2426
+ category: __expectString,
2394
2427
  content: (_) => de_FlowTraceNodeInputContent(__expectUnion(_), context),
2428
+ executionChain: _json,
2395
2429
  nodeInputName: __expectString,
2430
+ source: _json,
2431
+ type: __expectString,
2396
2432
  });
2397
2433
  };
2398
2434
  const de_FlowTraceNodeInputFields = (output, context) => {
@@ -2421,7 +2457,9 @@ const de_FlowTraceNodeOutputEvent = (output, context) => {
2421
2457
  const de_FlowTraceNodeOutputField = (output, context) => {
2422
2458
  return take(output, {
2423
2459
  content: (_) => de_FlowTraceNodeOutputContent(__expectUnion(_), context),
2460
+ next: _json,
2424
2461
  nodeOutputName: __expectString,
2462
+ type: __expectString,
2425
2463
  });
2426
2464
  };
2427
2465
  const de_FlowTraceNodeOutputFields = (output, context) => {
@@ -2661,6 +2699,24 @@ const de_ModelInvocationInput = (output, context) => {
2661
2699
  type: __expectString,
2662
2700
  });
2663
2701
  };
2702
+ const de_NodeActionEvent = (output, context) => {
2703
+ return take(output, {
2704
+ nodeName: __expectString,
2705
+ operationName: __expectString,
2706
+ operationRequest: (_) => de_Document(_, context),
2707
+ operationResponse: (_) => de_Document(_, context),
2708
+ requestId: __expectString,
2709
+ serviceName: __expectString,
2710
+ timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2711
+ });
2712
+ };
2713
+ const de_NodeDependencyEvent = (output, context) => {
2714
+ return take(output, {
2715
+ nodeName: __expectString,
2716
+ timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2717
+ traceElements: (_) => de_NodeTraceElements(__expectUnion(_), context),
2718
+ });
2719
+ };
2664
2720
  const de_NodeExecutionContent = (output, context) => {
2665
2721
  if (output.document != null) {
2666
2722
  return {
@@ -2686,8 +2742,12 @@ const de_NodeInputEvent = (output, context) => {
2686
2742
  };
2687
2743
  const de_NodeInputField = (output, context) => {
2688
2744
  return take(output, {
2745
+ category: __expectString,
2689
2746
  content: (_) => de_NodeExecutionContent(__expectUnion(_), context),
2747
+ executionChain: _json,
2690
2748
  name: __expectString,
2749
+ source: _json,
2750
+ type: __expectString,
2691
2751
  });
2692
2752
  };
2693
2753
  const de_NodeInputFields = (output, context) => {
@@ -2709,6 +2769,8 @@ const de_NodeOutputField = (output, context) => {
2709
2769
  return take(output, {
2710
2770
  content: (_) => de_NodeExecutionContent(__expectUnion(_), context),
2711
2771
  name: __expectString,
2772
+ next: _json,
2773
+ type: __expectString,
2712
2774
  });
2713
2775
  };
2714
2776
  const de_NodeOutputFields = (output, context) => {
@@ -2719,6 +2781,14 @@ const de_NodeOutputFields = (output, context) => {
2719
2781
  });
2720
2782
  return retVal;
2721
2783
  };
2784
+ const de_NodeTraceElements = (output, context) => {
2785
+ if (output.agentTraces != null) {
2786
+ return {
2787
+ agentTraces: de_AgentTraces(output.agentTraces, context),
2788
+ };
2789
+ }
2790
+ return { $unknown: Object.entries(output)[0] };
2791
+ };
2722
2792
  const de_Observation = (output, context) => {
2723
2793
  return take(output, {
2724
2794
  actionGroupInvocationOutput: (_) => de_ActionGroupInvocationOutput(_, context),
@@ -3002,6 +3072,14 @@ const de_Trace = (output, context) => {
3002
3072
  }
3003
3073
  return { $unknown: Object.entries(output)[0] };
3004
3074
  };
3075
+ const de_TraceElements = (output, context) => {
3076
+ if (output.agentTraces != null) {
3077
+ return {
3078
+ agentTraces: de_AgentTraces(output.agentTraces, context),
3079
+ };
3080
+ }
3081
+ return { $unknown: Object.entries(output)[0] };
3082
+ };
3005
3083
  const de_TracePart = (output, context) => {
3006
3084
  return take(output, {
3007
3085
  agentAliasId: __expectString,