// Use this for initialization
 void Start()
 {
     bot = new ChatbotMobileWeb();
     LoadFilesFromConfigFolder();
     bot.LoadSettings(GlobalSettings.text, GenderSubstitutions.text, Person2Substitutions.text, PersonSubstitutions.text, Substitutions.text, DefaultPredicates.text, Splitters.text);
     TextAssetToXmlDocumentAIMLFiles();
     bot.loadAIMLFromXML(aimlXmlDocumentList.ToArray(), aimlXmlDocumentListFileName.ToArray());
     bot.LoadBrain();
 }
예제 #2
0
    /// <summary>
    /// Button to send the question to the robot
    /// </summary>
    public string SendQuestionToRobot(string userQuestion)
    {
        ChatbotMobileWeb bot1 = bot;

        if (!userQuestion.Equals(""))
        {
            // Response Bot AIML
            var x = bot1.getOutput(userQuestion);
            // Response BotAIml in the Chat window
            robotOutput.text = x;
            answer           = x;
            Debug.Log("Inside the sendquestionto robot function");
            // for empty the voice input
        }
        else
        {
            answer = "Sorry can you repete that again...";
        }

        Debug.Log("Answer of question:" + answer);

        return(answer);
    }