diff --git a/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/service/AzureAIServices.java b/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/service/AzureAIServices.java index 0cd21537..36c3a4eb 100644 --- a/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/service/AzureAIServices.java +++ b/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/service/AzureAIServices.java @@ -296,6 +296,12 @@ public DPResponse search(String text, Classification classification) { } } + if(products.size() > 4) + { + // too many items for a content card + dpResponse.setContentCard(false); + } + dpResponse.setDpResponseText(dpResponseText); dpResponse.setProducts(products); }