aws_sdk_bedrockagentruntime/client/retrieve_and_generate.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`RetrieveAndGenerate`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`session_id(impl Into<String>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::session_id) / [`set_session_id(Option<String>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_session_id):<br>required: **false**<br><p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p><br>
7 /// - [`input(RetrieveAndGenerateInput)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::input) / [`set_input(Option<RetrieveAndGenerateInput>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_input):<br>required: **true**<br><p>Contains the query to be made to the knowledge base.</p><br>
8 /// - [`retrieve_and_generate_configuration(RetrieveAndGenerateConfiguration)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::retrieve_and_generate_configuration) / [`set_retrieve_and_generate_configuration(Option<RetrieveAndGenerateConfiguration>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_retrieve_and_generate_configuration):<br>required: **false**<br><p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p><br>
9 /// - [`session_configuration(RetrieveAndGenerateSessionConfiguration)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::session_configuration) / [`set_session_configuration(Option<RetrieveAndGenerateSessionConfiguration>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_session_configuration):<br>required: **false**<br><p>Contains details about the session with the knowledge base.</p><br>
10 /// - On success, responds with [`RetrieveAndGenerateOutput`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput) with field(s):
11 /// - [`session_id(String)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::session_id): <p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>
12 /// - [`output(Option<RetrieveAndGenerateOutput>)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::output): <p>Contains the response generated from querying the knowledge base.</p>
13 /// - [`citations(Option<Vec::<Citation>>)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::citations): <p>A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.</p>
14 /// - [`guardrail_action(Option<GuadrailAction>)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::guardrail_action): <p>Specifies if there is a guardrail intervention in the response.</p>
15 /// - On failure, responds with [`SdkError<RetrieveAndGenerateError>`](crate::operation::retrieve_and_generate::RetrieveAndGenerateError)
16 pub fn retrieve_and_generate(&self) -> crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder {
17 crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::new(self.handle.clone())
18 }
19}