getRecommendations method
Future<GetRecommendationsResponse>
getRecommendations({
- required GetRecommendationsParams getRecommendationsParams,
- RequestOptions? requestOptions,
Retrieves recommendations from selected AI models.
Required API Key ACLs:
- search
Parameters:
getRecommendationsParams
requestOptions
additional request configuration.
Implementation
Future<GetRecommendationsResponse> getRecommendations({
required GetRecommendationsParams getRecommendationsParams,
RequestOptions? requestOptions,
}) async {
final request = ApiRequest(
method: RequestMethod.post,
path: r'/1/indexes/*/recommendations',
isRead: true,
body: getRecommendationsParams.toJson(),
);
final response = await _retryStrategy.execute(
request: request,
options: requestOptions,
);
return deserialize<GetRecommendationsResponse, GetRecommendationsResponse>(
response,
'GetRecommendationsResponse',
growable: true,
);
}