首页 \ 问答 \ BotFramework:PromptDialog.Choice不再返回部分匹配(BotFramework: PromptDialog.Choice no longer returns partial matches)

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
更新时间:2023-04-21 21:04

最满意答案

另一种选择是将其存储在用户会话中。 这样做的好处是,如果用户关闭了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.

相关问答

更多
  • 如果列表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);
  • 我认为这: $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 ...
  • 你不需要再把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 :: 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 这样做需要一个 ...
  • 我不知道我是否正确地回答了你的问题,但我认为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 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。