get_recommendations
async
¶
get_recommendations(
assistant_id: UuidOrArn,
session_id: UuidOrArn,
*,
config_overrides: Optional[AsyncQConnectClientConfig] = None,
max_results: Optional[MaxResults] = None,
wait_time_seconds: Optional[WaitTimeSeconds] = None,
next_chunk_token: Optional[NextToken] = None,
recommendation_type: Optional[RecommendationType] = None,
) -> GetRecommendationsResponse
This API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024, you will need to create a new Assistant in the Connect Customer console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.
Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.
Parameters:
-
assistant_id(UuidOrArn) –The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
-
session_id(UuidOrArn) –The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return per page.
-
wait_time_seconds(Optional[WaitTimeSeconds], default:None) –The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than
WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list. -
next_chunk_token(Optional[NextToken], default:None) –The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.
-
recommendation_type(Optional[RecommendationType], default:None) –The type of recommendation being requested.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ResourceNotFoundException–The specified resource does not exist.
-
ValidationException–The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_qconnect/_services/async_q_connect.py
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | |