get_recommendations
¶
get_recommendations(
assistant_id: UuidOrArn,
session_id: UuidOrArn,
*,
config_overrides: Optional[WisdomClientConfig] = None,
max_results: Optional[MaxResults] = None,
wait_time_seconds: Optional[WaitTimeSeconds] = None,
) -> GetRecommendationsResponse
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 Wisdom 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.
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.