File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
playground/javascript/node
tests/CTS/requests/recommend Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const searchQuery = process.env.SEARCH_QUERY || 'test_query';
1010// Init client with appId and apiKey
1111const client = recommendClient ( appId , apiKey ) ;
1212
13- async function testRecommend ( ) {
13+ async function testGetRecommendations ( ) {
1414 try {
1515 const res = await client . getRecommendations ( {
1616 requests : [
@@ -23,14 +23,20 @@ async function testRecommend() {
2323 ] ,
2424 } ) ;
2525
26- console . log ( ` [OK]` , res ) ;
26+ console . log ( ' [OK] GetRecommendations' , res ) ;
2727 } catch ( e ) {
2828 if ( e instanceof ApiError ) {
2929 return console . log ( `[${ e . status } ] ${ e . message } ` , e . stackTrace ) ;
3030 }
3131
32- console . log ( '[ERROR]' , e ) ;
32+ console . log ( '[ERROR] GetRecommendations ' , e ) ;
3333 }
3434}
3535
36+
37+
38+ async function testRecommend ( ) {
39+ await testGetRecommendations ( ) ;
40+ }
41+
3642testRecommend ( ) ;
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " batch recommend rules" ,
4+ "parameters" : {
5+ "indexName" : " indexName" ,
6+ "model" : " related-products"
7+ },
8+ "request" : {
9+ "path" : " /1/indexes/indexName/related-products/recommend/rules/batch" ,
10+ "method" : " POST" ,
11+ "body" : {
12+ "rules" : []
13+ }
14+ }
15+ }
16+ ]
You can’t perform that action at this time.
0 commit comments