Sep 20, 2024
Retrieve recommendations
Retrieves recommendations from selected AI models.
Usage
Required ACL:
search
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Recommend
let client = try RecommendClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY")
let response = try await client
.getRecommendations(getRecommendationsParams: GetRecommendationsParams(requests: [
RecommendationsRequest
.relatedQuery(RelatedQuery(
indexName: "ALGOLIA_INDEX_NAME",
threshold: 42.1,
model: RelatedModel.relatedProducts,
objectID: "objectID"
)),
]))
Did you find this page helpful?