Hello Dear Leslie,
I want to use Oscova smalltalk. To do this, I've used the following code. But when I enter the Hello word, the application does not respond. Would you please help me, what is the problem of the program?
Thank you in advance for any help you can provide.
Best regards
Ebrahim
internal class WelcomeRobot : Dialog
{
[Expression("@Greetings")]
public void Default(Context context, Result result)
{
var appEntity = result.Entities.OfType("app");
Process.Start(appEntity.Value);
}
}
var bot = new OscovaBot();
WelcomeRobot dialog = new WelcomeRobot();
bot.Dialogs.Add(dialog);
string location = AppDomain.CurrentDomain.BaseDirectory + "Syn\\Dialog.siml";
bot.Import(XDocument.Load(location));
bot.Trainer.StartTraining();
<Siml>
<Dialog Name="WelcomeRobot" IntentAlias="Greetings">
<Intent>
<Expression>Hello</Expression>
<Response>I am doing great!</Response>
</Intent>
<Intent>
<Expression>Hi there</Expression>
<Response>Well, hello there!</Response>
</Intent>
</Dialog>
</Siml>