rerank
async
¶
rerank(
queries: RerankQueriesList,
sources: RerankSourcesList,
reranking_configuration: RerankingConfiguration,
*,
config_overrides: Optional[AsyncBedrockAgentRuntimeClientConfig] = None,
next_token: Optional[NextToken] = None,
) -> RerankResponse
Reranks the relevance of sources based on queries. For more information, see Improve the relevance of query responses with a reranker model.
Parameters:
-
queries(RerankQueriesList) –An array of objects, each of which contains information about a query to submit to the reranker model.
-
sources(RerankSourcesList) –An array of objects, each of which contains information about the sources to rerank.
-
reranking_configuration(RerankingConfiguration) –Contains configurations for reranking.
-
next_token(Optional[NextToken], default:None) –If the total number of results was greater than could fit in a response, a token is returned in the
nextTokenfield. You can enter that token in this field to return the next batch of results.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions. Check your permissions and retry your request.
-
BadGatewayException–There was an issue with a dependency due to a server issue. Retry your request.
-
ConflictException–There was a conflict performing an operation. Resolve the conflict and retry your request.
-
DependencyFailedException–There was an issue with a dependency. Check the resource configurations and retry the request.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ServiceQuotaExceededException–The number of requests exceeds the service quota. Resubmit your request later.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agent_runtime/_services/async_bedrock_agent_runtime.py
1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 | |