BotFramework:PromptDialog.Choice不再返回部分匹配(BotFramework: PromptDialog.Choice no longer returns partial matches)
PromptDialog.Choice用于返回部分匹配,但升级到BotFramework 3.8.1之后不再是这种情况。 底层的PromptRecognizer确实有选项
PromptRecognizeChoicesOptions.AllowPartialMatches
但该选项不会暴露给Dialog。 (PromptChoice.TryParse
调用无选项的识别器)有没有办法允许部分匹配?
PromptDialog.Choice used to return partial matches, but after upgrading to BotFramework 3.8.1 this is no longer the case. The underlying PromptRecognizer does have the option
PromptRecognizeChoicesOptions.AllowPartialMatches
but that option is not exposed to the Dialog. (PromptChoice.TryParse
calls the recognizer without options)Is there a way to allow partial matches?
原文:https://stackoverflow.com/questions/44241355
最满意答案
另一种选择是将其存储在用户会话中。 这样做的好处是,如果用户关闭了cookie并且该站点满足无cookie会话状态,那么他们仍然可以选择产品和结账。
需要注意的是你有多少可能最终存储在会话中。 从它的声音来看,这不会是一个问题,但如果这可能会耗尽不可接受的内存量,那么你可能需要考虑数据库方法而不是cookie。Another option would be to store it in the users session. A benefit of this is if the user has cookies turned off and the site caters for cookieless session state then they will still be able to select products and checkout.
The thing to look out for is how much you could potentially end up storing in session. From the sounds of it this will not be an issue but if this could potentially use up an unacceptable amount of memory then you would probably need to consider a database approach anyway rather than cookies.
相关问答
更多-
比较两个类型产品列表(Comparing two Lists of Type Product)[2022-06-24]
如果列表B总是要赢,那么你为什么要麻烦同步? ListA.Clear(); ListA.AddRange(ListB.Items); If List B is always going to win, why would you bother synchronising? ListA.Clear(); ListA.AddRange(ListB.Items); -
从列表中选择产品(Select product from the list)[2021-11-21]
我认为这: $serial = intval($_GET['serial']); $query = "SELECT serial, name, desription FROM product_list WHERE serial = {$serial}"; echo "{$row[name]}"; 应该是这样的: $serial = intval($_GET['code']); $query = "SELECT serial, name, desription FROM product_lis ... -
如果产品已在会话中存在,如何增加产品数量(How to increase product quantity if a product is already exist in session)[2022-05-08]
你不需要再把product_id等放在那里,改变金额。 您的代码将更短,更清晰,您可以避免其他可能的错别字等。 if($cart_itm['product_id'] == $product_id) { $cart_itm['quantity'] += $product_quantity; // expect in $product_quantity is the amount you want to add to the current one // it's a shorter varia ... -
您可以传递您需要相关产品的产品ID。 例如,您需要特定产品的相关产品(Say $ _product) 您可以通过以下方式获取相关产品ID $_product->getRelatedProductIds() 您可以通过以下方式查看ID数组: print_r($_product->getRelatedProductIds()); 我希望这能帮到您。 此致,Manju I have find my question of answer. $collection = Mage::getModel('cat ...
-
只要该对象(以及它具有的任何对象依赖项)被标记为[Serializable]就可以将自己的自定义对象列表存储在会话中。 在这种情况下,您将拥有: [Serializable] public class BasketItem { public string ProductCode { get; set; } public int Quantity { get; set; } } 然后,将这些对象的集合存储在会话中,例如List
更新:以为我会根据下面的评论进行澄清,因 ... -
你的目标是什么? 特价不依赖于客户群。 如果某些特定的自定义条件可以由目录规则定义,则使用目录规则。 否则,您需要创建自定义模块并在特定条件下修改产品价格计算(位复杂) What is your objective? Special price is not dependent on customer group. If there is some specific custom condition that can be defined by catalog rules then use catalog ...
-
$_SESSION['views'] = array(); 然后添加新产品 function addProduct($product) { $_SESSION['views'][] = $product; if (count($_SESSION['views']) > 7) { $removedElement = array_shift($_SESSION['views']); } } 询问 SELECT * FROM `property` WHERE id in ...
-
另一种选择是将其存储在用户会话中。 这样做的好处是,如果用户关闭了cookie并且该站点满足无cookie会话状态,那么他们仍然可以选择产品和结账。 需要注意的是你有多少可能最终存储在会话中。 从它的声音来看,这不会是一个问题,但如果这可能会耗尽不可接受的内存量,那么你可能需要考虑数据库方法而不是cookie。 Another option would be to store it in the users session. A benefit of this is if the user has cook ...
-
迭代的列表产品(product of list iteratively)[2020-02-12]
您可以使用折叠: product :: Num a => [a] -> a product xs = foldl (*) 1 xs 这也可以通过foldl'或foldr严格完成,差异主要是表现,但是因为你刚刚开始,我将跳过这次演讲。 折叠是做什么的? 让我们从foldl的基本定义开始: foldl :: (a -> b -> a) -> a -> [b] -> a foldl f acc [] = acc foldl f acc (x:xs) = foldl f (f acc x) xs 这样做需要一个 ... -
在会话中存储数组(Storing an array in a session)[2024-04-16]
我不知道我是否正确地回答了你的问题,但我认为put函数需要更新: public static function put($name, $value) { if(empty($_SESSION[$name])){ // create a new array with the given name $_SESSION[$name] = array($value); } else { // add a new item at the end of the ...