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
15
16
17
18
19
20
21
22
23
24
25
using Algolia.Search.Clients;
using Algolia.Search.Http;
using Algolia.Search.Models.Recommend;
var client = new RecommendClient(
new RecommendConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
);
var response = await client.GetRecommendationsAsync(
new GetRecommendationsParams
{
Requests = new List<RecommendationsRequest>
{
new RecommendationsRequest(
new RelatedQuery
{
IndexName = "ALGOLIA_INDEX_NAME",
ObjectID = "objectID",
Model = Enum.Parse<RelatedModel>("RelatedProducts"),
Threshold = 42.1,
}
),
},
}
);
Did you find this page helpful?