aws_sdk_bedrockagentruntime/client/
rerank.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 [`Rerank`](crate::operation::rerank::builders::RerankFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::rerank::builders::RerankFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`queries(RerankQuery)`](crate::operation::rerank::builders::RerankFluentBuilder::queries) / [`set_queries(Option<Vec::<RerankQuery>>)`](crate::operation::rerank::builders::RerankFluentBuilder::set_queries):<br>required: **true**<br><p>An array of objects, each of which contains information about a query to submit to the reranker model.</p><br>
8    ///   - [`sources(RerankSource)`](crate::operation::rerank::builders::RerankFluentBuilder::sources) / [`set_sources(Option<Vec::<RerankSource>>)`](crate::operation::rerank::builders::RerankFluentBuilder::set_sources):<br>required: **true**<br><p>An array of objects, each of which contains information about the sources to rerank.</p><br>
9    ///   - [`reranking_configuration(RerankingConfiguration)`](crate::operation::rerank::builders::RerankFluentBuilder::reranking_configuration) / [`set_reranking_configuration(Option<RerankingConfiguration>)`](crate::operation::rerank::builders::RerankFluentBuilder::set_reranking_configuration):<br>required: **true**<br><p>Contains configurations for reranking.</p><br>
10    ///   - [`next_token(impl Into<String>)`](crate::operation::rerank::builders::RerankFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::rerank::builders::RerankFluentBuilder::set_next_token):<br>required: **false**<br><p>If the total number of results was greater than could fit in a response, a token is returned in the <code>nextToken</code> field. You can enter that token in this field to return the next batch of results.</p><br>
11    /// - On success, responds with [`RerankOutput`](crate::operation::rerank::RerankOutput) with field(s):
12    ///   - [`results(Vec::<RerankResult>)`](crate::operation::rerank::RerankOutput::results): <p>An array of objects, each of which contains information about the results of reranking.</p>
13    ///   - [`next_token(Option<String>)`](crate::operation::rerank::RerankOutput::next_token): <p>If the total number of results is greater than can fit in the response, use this token in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
14    /// - On failure, responds with [`SdkError<RerankError>`](crate::operation::rerank::RerankError)
15    pub fn rerank(&self) -> crate::operation::rerank::builders::RerankFluentBuilder {
16        crate::operation::rerank::builders::RerankFluentBuilder::new(self.handle.clone())
17    }
18}