我正在使用 FormFlow 设计一个机器人,其中一个输入将要求用户附加一个文件以进一步进行。我可以看到下面的链接解决了类似的问题。 https://github.com/Microsoft/BotBuilder/issues/570
链接中提供的解决方案是使用自定义 IRecognizer 或如下
a) 将其放入不暴露给 FormFlow 的私有字段/属性中。
b) 将其作为向表单流公开的字段的值。
c) 使用私有属性动态生成允许在它们之间进行选择的字段。
我对 Bot Framework 很幼稚。在使用FormFlow从客户那里接收附件时,是否有任何示例可以实现这一点。
下面是我的代码片段
enter code here
[Serializable]
public class DocBot
{
[Prompt("What's your name?")]
public string Name { get; set; }
[Prompt("Hey {&} , Choose the options below? {||}")]
public Service? shaun;
[Prompt("Attach the Document required for further processing?")]
public string Document { get; set; }
-- Need Suggestion on receiving documents attachment from the user here
[Prompt("What is your Job Title there?")]
public string JobTitle { get; set; }
[Prompt("What's the best number to contact you on?")]
public string Phone { get; set; }
public enum Service
{
Consultancy, Support, ProjectDelivery, Unknown
}
public static IForm<DocBot> BuildEnquiryForm()
{
return new FormBuilder<DocBot>()
.Message("Welcome to Doc BOT!!!")
.Field(nameof(Name))
// .Field(nameof(Document))
-- Need Suggestion on receiving documents attachment from the user here
.Build();
}
}