aws-sdk-bedrockagentruntime 1.126.0

AWS SDK for Agents for Amazon Bedrock Runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn type_erase_result<O, E>(
    result: ::std::result::Result<O, E>,
) -> ::std::result::Result<
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
>
where
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
{
    result
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
        .map_err(::std::convert::Into::into)
}

pub fn parse_http_error_metadata(
    _response_status: u16,
    response_headers: &::aws_smithy_runtime_api::http::Headers,
    response_body: &[u8],
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    crate::json_errors::parse_error_metadata(response_body, response_headers)
}

pub(crate) mod shape_create_invocation;

pub(crate) mod shape_create_session;

pub(crate) mod shape_delete_agent_memory;

pub(crate) mod shape_delete_session;

pub(crate) mod shape_end_session;

pub(crate) mod shape_generate_query;

pub(crate) mod shape_get_agent_memory;

pub(crate) mod shape_get_execution_flow_snapshot;

pub(crate) mod shape_get_flow_execution;

pub(crate) mod shape_get_invocation_step;

pub(crate) mod shape_get_session;

pub(crate) mod shape_invoke_agent;

pub(crate) mod shape_invoke_flow;

pub(crate) mod shape_invoke_inline_agent;

pub(crate) mod shape_list_flow_execution_events;

pub(crate) mod shape_list_flow_executions;

pub(crate) mod shape_list_invocation_steps;

pub(crate) mod shape_list_invocations;

pub(crate) mod shape_list_sessions;

pub(crate) mod shape_list_tags_for_resource;

pub(crate) mod shape_optimize_prompt;

pub(crate) mod shape_put_invocation_step;

pub(crate) mod shape_rerank;

pub(crate) mod shape_retrieve;

pub(crate) mod shape_retrieve_and_generate;

pub(crate) mod shape_retrieve_and_generate_stream;

pub(crate) mod shape_start_flow_execution;

pub(crate) mod shape_stop_flow_execution;

pub(crate) mod shape_tag_resource;

pub(crate) mod shape_untag_resource;

pub(crate) mod shape_update_session;

pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
    if data.is_empty() {
        b"{}"
    } else {
        data
    }
}

pub(crate) mod shape_access_denied_exception;

pub(crate) mod shape_bad_gateway_exception;

pub(crate) mod shape_conflict_exception;

pub(crate) mod shape_create_invocation_input;

pub(crate) mod shape_create_session_input;

pub(crate) mod shape_dependency_failed_exception;

pub(crate) mod shape_generate_query_input;

pub(crate) mod shape_get_invocation_step_input;

pub(crate) mod shape_internal_server_exception;

pub(crate) mod shape_invoke_agent_input;

pub(crate) mod shape_invoke_agent_output;

pub(crate) mod shape_invoke_flow_input;

pub(crate) mod shape_invoke_flow_output;

pub(crate) mod shape_invoke_inline_agent_input;

pub(crate) mod shape_invoke_inline_agent_output;

pub(crate) mod shape_list_invocation_steps_input;

pub(crate) mod shape_model_not_ready_exception;

pub(crate) mod shape_optimize_prompt_input;

pub(crate) mod shape_optimize_prompt_output;

pub(crate) mod shape_put_invocation_step_input;

pub(crate) mod shape_rerank_input;

pub(crate) mod shape_resource_not_found_exception;

pub(crate) mod shape_retrieve_and_generate_input;

pub(crate) mod shape_retrieve_and_generate_stream_input;

pub(crate) mod shape_retrieve_and_generate_stream_output;

pub(crate) mod shape_retrieve_input;

pub(crate) mod shape_service_quota_exceeded_exception;

pub(crate) mod shape_start_flow_execution_input;

pub(crate) mod shape_tag_resource_input;

pub(crate) mod shape_throttling_exception;

pub(crate) mod shape_update_session_input;

pub(crate) mod shape_validation_exception;

pub fn parse_event_stream_error_metadata(
    payload: &::bytes::Bytes,
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    crate::json_errors::parse_error_metadata(payload, &::aws_smithy_runtime_api::http::Headers::new())
}

pub(crate) mod shape_agent_action_group;

pub(crate) mod shape_bedrock_model_configurations;

pub(crate) mod shape_citations;

pub(crate) mod shape_collaborator;

pub(crate) mod shape_collaborator_configuration;

pub(crate) mod shape_custom_orchestration;

pub(crate) mod shape_flow_execution_errors;

pub(crate) mod shape_flow_execution_events;

pub(crate) mod shape_flow_execution_summaries;

pub(crate) mod shape_flow_input;

pub(crate) mod shape_generated_queries;

pub(crate) mod shape_guardrail_configuration;

pub(crate) mod shape_guardrail_configuration_with_arn;

pub(crate) mod shape_inline_bedrock_model_configurations;

pub(crate) mod shape_inline_session_state;

pub(crate) mod shape_input_prompt;

pub(crate) mod shape_invocation_step;

pub(crate) mod shape_invocation_step_payload;

pub(crate) mod shape_invocation_step_summaries;

pub(crate) mod shape_invocation_summaries;

pub(crate) mod shape_knowledge_base;

pub(crate) mod shape_knowledge_base_query;

pub(crate) mod shape_knowledge_base_retrieval_configuration;

pub(crate) mod shape_knowledge_base_retrieval_results;

pub(crate) mod shape_memories;

pub(crate) mod shape_model_performance_configuration;

pub(crate) mod shape_prompt_creation_configurations;

pub(crate) mod shape_prompt_override_configuration;

pub(crate) mod shape_query_generation_input;

pub(crate) mod shape_rerank_query;

pub(crate) mod shape_rerank_results_list;

pub(crate) mod shape_rerank_source;

pub(crate) mod shape_reranking_configuration;

pub(crate) mod shape_retrieve_and_generate_configuration;

pub(crate) mod shape_retrieve_and_generate_output;

pub(crate) mod shape_retrieve_and_generate_session_configuration;

pub(crate) mod shape_session_metadata_map;

pub(crate) mod shape_session_state;

pub(crate) mod shape_session_summaries;

pub(crate) mod shape_streaming_configurations;

pub(crate) mod shape_tags_map;

pub(crate) mod shape_transformation_configuration;

pub(crate) mod shape_action_group_executor;

pub(crate) mod shape_analyze_prompt_event;

pub(crate) mod shape_api_schema;

pub(crate) mod shape_bedrock_reranking_configuration;

pub(crate) mod shape_bedrock_session_content_block;

pub(crate) mod shape_citation;

pub(crate) mod shape_citation_event;

pub(crate) mod shape_conversation_history;

pub(crate) mod shape_external_sources_retrieve_and_generate_configuration;

pub(crate) mod shape_file_part;

pub(crate) mod shape_flow_completion_event;

pub(crate) mod shape_flow_execution_error;

pub(crate) mod shape_flow_execution_event;

pub(crate) mod shape_flow_execution_summary;

pub(crate) mod shape_flow_input_content;

pub(crate) mod shape_flow_multi_turn_input_request_event;

pub(crate) mod shape_flow_output_event;

pub(crate) mod shape_flow_trace_event;

pub(crate) mod shape_function_schema;

pub(crate) mod shape_generated_query;

pub(crate) mod shape_guardrail_event;

pub(crate) mod shape_inline_agent_file_part;

pub(crate) mod shape_inline_agent_payload_part;

pub(crate) mod shape_inline_agent_return_control_payload;

pub(crate) mod shape_inline_agent_trace_part;

pub(crate) mod shape_input_file;

pub(crate) mod shape_input_image;

pub(crate) mod shape_invocation_result_member;

pub(crate) mod shape_invocation_step_summary;

pub(crate) mod shape_invocation_summary;

pub(crate) mod shape_knowledge_base_configuration;

pub(crate) mod shape_knowledge_base_retrieval_result;

pub(crate) mod shape_knowledge_base_retrieve_and_generate_configuration;

pub(crate) mod shape_knowledge_base_vector_search_configuration;

pub(crate) mod shape_memory;

pub(crate) mod shape_optimized_prompt_event;

pub(crate) mod shape_orchestration_executor;

pub(crate) mod shape_payload_part;

pub(crate) mod shape_performance_configuration;

pub(crate) mod shape_prompt_configuration;

pub(crate) mod shape_rerank_document;

pub(crate) mod shape_rerank_result;

pub(crate) mod shape_rerank_text_document;

pub(crate) mod shape_retrieve_and_generate_output_event;

pub(crate) mod shape_return_control_payload;

pub(crate) mod shape_session_summary;

pub(crate) mod shape_text_prompt;

pub(crate) mod shape_text_to_sql_configuration;

pub(crate) mod shape_trace_part;

pub(crate) mod shape_api_result;

pub(crate) mod shape_bedrock_reranking_model_configuration;

pub(crate) mod shape_bedrock_session_content_blocks;

pub(crate) mod shape_condition_result_event;

pub(crate) mod shape_external_source;

pub(crate) mod shape_external_sources_generation_configuration;

pub(crate) mod shape_file_source;

pub(crate) mod shape_flow_execution_input_event;

pub(crate) mod shape_flow_execution_output_event;

pub(crate) mod shape_flow_failure_event;

pub(crate) mod shape_function_definition;

pub(crate) mod shape_function_result;

pub(crate) mod shape_generated_response_part;

pub(crate) mod shape_generation_configuration;

pub(crate) mod shape_image_block;

pub(crate) mod shape_implicit_filter_configuration;

pub(crate) mod shape_inference_configuration;

pub(crate) mod shape_memory_session_summary;

pub(crate) mod shape_message;

pub(crate) mod shape_node_action_event;

pub(crate) mod shape_node_dependency_event;

pub(crate) mod shape_node_failure_event;

pub(crate) mod shape_node_input_event;

pub(crate) mod shape_node_output_event;

pub(crate) mod shape_orchestration_configuration;

pub(crate) mod shape_retrieval_filter;

pub(crate) mod shape_retrieval_result_content;

pub(crate) mod shape_retrieval_result_location;

pub(crate) mod shape_retrieval_result_metadata;

pub(crate) mod shape_retrieved_references;

pub(crate) mod shape_s3_identifier;

pub(crate) mod shape_text_to_sql_knowledge_base_configuration;

pub(crate) mod shape_vector_search_reranking_configuration;

pub(crate) mod shape_attribution;

pub(crate) mod shape_audio_segment;

pub(crate) mod shape_byte_content_doc;

pub(crate) mod shape_byte_content_file;

pub(crate) mod shape_caller_chain;

pub(crate) mod shape_content_block;

pub(crate) mod shape_content_body;

pub(crate) mod shape_filter_attribute;

pub(crate) mod shape_flow_input_fields;

pub(crate) mod shape_flow_multi_turn_input_content;

pub(crate) mod shape_flow_output_content;

pub(crate) mod shape_flow_output_fields;

pub(crate) mod shape_flow_trace;

pub(crate) mod shape_image_source;

pub(crate) mod shape_inference_config;

pub(crate) mod shape_invocation_inputs;

pub(crate) mod shape_metadata_attribute_schema;

pub(crate) mod shape_node_input_fields;

pub(crate) mod shape_node_output_fields;

pub(crate) mod shape_node_trace_elements;

pub(crate) mod shape_optimized_prompt;

pub(crate) mod shape_output_files;

pub(crate) mod shape_parameter_detail;

pub(crate) mod shape_prompt_template;

pub(crate) mod shape_query_transformation_configuration;

pub(crate) mod shape_retrieval_result_confluence_location;

pub(crate) mod shape_retrieval_result_content_row;

pub(crate) mod shape_retrieval_result_custom_document_location;

pub(crate) mod shape_retrieval_result_kendra_document_location;

pub(crate) mod shape_retrieval_result_s3_location;

pub(crate) mod shape_retrieval_result_salesforce_location;

pub(crate) mod shape_retrieval_result_share_point_location;

pub(crate) mod shape_retrieval_result_sql_location;

pub(crate) mod shape_retrieval_result_web_location;

pub(crate) mod shape_retrieved_reference;

pub(crate) mod shape_s3_object_doc;

pub(crate) mod shape_s3_object_file;

pub(crate) mod shape_satisfied_conditions;

pub(crate) mod shape_text_response_part;

pub(crate) mod shape_trace;

pub(crate) mod shape_vector_search_bedrock_reranking_configuration;

pub(crate) mod shape_video_segment;

pub(crate) mod shape_agent_traces;

pub(crate) mod shape_caller;

pub(crate) mod shape_custom_orchestration_trace;

pub(crate) mod shape_failure_trace;

pub(crate) mod shape_flow_input_field;

pub(crate) mod shape_flow_output_field;

pub(crate) mod shape_flow_trace_condition_node_result_event;

pub(crate) mod shape_flow_trace_dependency_event;

pub(crate) mod shape_flow_trace_node_action_event;

pub(crate) mod shape_flow_trace_node_input_event;

pub(crate) mod shape_flow_trace_node_output_event;

pub(crate) mod shape_guardrail_trace;

pub(crate) mod shape_image_input;

pub(crate) mod shape_invocation_input_member;

pub(crate) mod shape_metadata_configuration_for_reranking;

pub(crate) mod shape_node_input_field;

pub(crate) mod shape_node_output_field;

pub(crate) mod shape_orchestration_trace;

pub(crate) mod shape_output_file;

pub(crate) mod shape_post_processing_trace;

pub(crate) mod shape_pre_processing_trace;

pub(crate) mod shape_retrieval_result_content_column;

pub(crate) mod shape_routing_classifier_trace;

pub(crate) mod shape_s3_location;

pub(crate) mod shape_satisfied_condition;

pub(crate) mod shape_span;

pub(crate) mod shape_text_inference_config;

pub(crate) mod shape_vector_search_bedrock_reranking_model_configuration;

pub(crate) mod shape_api_invocation_input;

pub(crate) mod shape_custom_orchestration_trace_event;

pub(crate) mod shape_flow_execution_content;

pub(crate) mod shape_flow_trace_conditions;

pub(crate) mod shape_flow_trace_node_input_fields;

pub(crate) mod shape_flow_trace_node_output_fields;

pub(crate) mod shape_function_invocation_input;

pub(crate) mod shape_guardrail_assessment_list;

pub(crate) mod shape_image_input_source;

pub(crate) mod shape_invocation_input;

pub(crate) mod shape_metadata;

pub(crate) mod shape_model_invocation_input;

pub(crate) mod shape_node_execution_content;

pub(crate) mod shape_node_input_execution_chain;

pub(crate) mod shape_node_input_source;

pub(crate) mod shape_node_output_next_list;

pub(crate) mod shape_observation;

pub(crate) mod shape_orchestration_model_invocation_output;

pub(crate) mod shape_post_processing_model_invocation_output;

pub(crate) mod shape_pre_processing_model_invocation_output;

pub(crate) mod shape_rationale;

pub(crate) mod shape_reranking_metadata_selective_mode_configuration;

pub(crate) mod shape_routing_classifier_model_invocation_output;

pub(crate) mod shape_trace_elements;

pub(crate) mod shape_action_group_invocation_input;

pub(crate) mod shape_action_group_invocation_output;

pub(crate) mod shape_agent_collaborator_invocation_input;

pub(crate) mod shape_agent_collaborator_invocation_output;

pub(crate) mod shape_api_parameters;

pub(crate) mod shape_api_request_body;

pub(crate) mod shape_code_interpreter_invocation_input;

pub(crate) mod shape_code_interpreter_invocation_output;

pub(crate) mod shape_field_for_reranking;

pub(crate) mod shape_final_response;

pub(crate) mod shape_flow_trace_condition;

pub(crate) mod shape_flow_trace_node_input_field;

pub(crate) mod shape_flow_trace_node_output_field;

pub(crate) mod shape_function_parameters;

pub(crate) mod shape_guardrail_assessment;

pub(crate) mod shape_knowledge_base_lookup_input;

pub(crate) mod shape_knowledge_base_lookup_output;

pub(crate) mod shape_node_input_execution_chain_item;

pub(crate) mod shape_node_output_next;

pub(crate) mod shape_post_processing_parsed_response;

pub(crate) mod shape_pre_processing_parsed_response;

pub(crate) mod shape_raw_response;

pub(crate) mod shape_reasoning_content_block;

pub(crate) mod shape_reprompt_response;

pub(crate) mod shape_usage;

pub(crate) mod shape_agent_collaborator_input_payload;

pub(crate) mod shape_agent_collaborator_output_payload;

pub(crate) mod shape_api_content_map;

pub(crate) mod shape_api_parameter;

pub(crate) mod shape_files;

pub(crate) mod shape_flow_trace_node_input_content;

pub(crate) mod shape_flow_trace_node_input_execution_chain;

pub(crate) mod shape_flow_trace_node_input_source;

pub(crate) mod shape_flow_trace_node_output_content;

pub(crate) mod shape_flow_trace_node_output_next_list;

pub(crate) mod shape_function_parameter;

pub(crate) mod shape_guardrail_content_policy_assessment;

pub(crate) mod shape_guardrail_sensitive_information_policy_assessment;

pub(crate) mod shape_guardrail_topic_policy_assessment;

pub(crate) mod shape_guardrail_word_policy_assessment;

pub(crate) mod shape_parameters;

pub(crate) mod shape_reasoning_text_block;

pub(crate) mod shape_request_body;

pub(crate) mod shape_stop_sequences;

pub(crate) mod shape_content_map;

pub(crate) mod shape_flow_trace_node_input_execution_chain_item;

pub(crate) mod shape_flow_trace_node_output_next;

pub(crate) mod shape_guardrail_content_filter_list;

pub(crate) mod shape_guardrail_custom_word_list;

pub(crate) mod shape_guardrail_managed_word_list;

pub(crate) mod shape_guardrail_pii_entity_filter_list;

pub(crate) mod shape_guardrail_regex_filter_list;

pub(crate) mod shape_guardrail_topic_list;

pub(crate) mod shape_parameter;

pub(crate) mod shape_property_parameters;

pub(crate) mod shape_return_control_results;

pub(crate) mod shape_guardrail_content_filter;

pub(crate) mod shape_guardrail_custom_word;

pub(crate) mod shape_guardrail_managed_word;

pub(crate) mod shape_guardrail_pii_entity_filter;

pub(crate) mod shape_guardrail_regex_filter;

pub(crate) mod shape_guardrail_topic;

pub(crate) mod shape_parameter_list;

pub(crate) mod shape_return_control_invocation_results;

pub(crate) mod shape_response_body;

pub(crate) mod shape_image_inputs;