Synbot Plugin Tutorial - interface to Syn Bot Software

Step 8 : Advanced Plugin Configuration options

Plugin configuration form is only available when no Bot session active (Bot stopped)

User-inserted image

Link to EZ Scripts

You can configure in Response Variable field the EZ Builder variable name where the text part of the Bot Response will be stored - default is $SynbotTextResponse

You can configure EZ Builder Scripts to execute : . When the plugin received a Bot Response (Field Response Script) . Just after a Bot session start (Field Start Script) . Just before a bot session stop (Field Stop Script) - BE CAREFUL This script cannot include Bot Commands or Bot Variables Getting or settings . When Bot Emotion value is changed

Bot response interpretating options

Text Part of the Bot Response if existing will send automatically a SAY or a sayEZB command to EZ Builder with nowait. you can configure the following options for the text message interpretation :. If box speak response is unchecked , No SAY commands are executed . If box speak response is ckecked . Case box Use EZB-V4 speaker is ckecked , SayEZB("text message") is executed . if not checked - Say("text message") is executed

If text message begin with | character the message is only displayed on Bot Console , whenever the speak flags settings If text message begin with character the message is speaked and in case of SayEZB , execution of EZ Command is waiting for End of speaking

If box execute response command is checked , Command part of Bot response will be launched in execution by EZ Builder. If not checked , Command part is only displayed on the Console. Default is checked.

box Log Full bot Response is only for debug ( so get unchecked)

box Authorize Batch entries If checked , you will be able to submit sequences of Bot query user inputs stored in external text files. Text files must be located in the Bot Save Directory folder. A new field will be showed in the plugin main window after Bot starting in order to input Batch file name to use. The EXEC button when pressed allow to launch sequential reading of Quey user inputs stored in the Batch text file. This option can be used for unit testing and bot learning automation.

User-inserted image

box Log Bot Dialog if checked bot dialog as displayed in bot console will be recorded in a file logdialog.txt located in the Bot Save Directory folder. Each Bot session (between Start Bot and Stop Bot) is timestamped - bot Dialog for a session is recorded in append mode to the mog file. This option combined with the Authorize Batch Entries allow easily to automate Bot Unit testing.

Possessive Apostroph filter if checked , if default Language is En(English) , if user input include possessive apostroph form extension will be done before sending the message to bot analysis - "the John's car" will be transformed on "the car of John" , making easier the SIML models.

Learning mode If checked learning mode will be activated (Planned in next version)

Default Language

When a bot session is started , First part of the Combo Box value (The language code) is stored in the Bot USER variable "Userlanguage" and can be used and tested in SIML files

Robot Type

When a bot session is started , field value is stored in the Bot USER variable "Robottype" and can be used and tested in SIML files

Default Bot Emotion

Default init value for Bot Emotion which will be set when you start the Bot Session. if the configured default Emotion is Empty , Bot Emotion will be saved and restore from one session to another for the same User , if the configured default Emotion is Empty.

Init Bot event

You can configure a Bot Event which will be raised after starting a Bot session. In this Bot event, you can do some initializations for the session (for example Bot and User variables value settings) Default is BOT INIT EVENT Below is the SIML model used in the example files to manage this init Bot event. Speech settings EZB Control must be active in order to set the voice parameters.

[Event]
      [Pattern]BOT INIT EVENT[/Pattern]
      [Response xml:space="preserve"]
        [Think]      
          [Bot Set="Copylearnto_en"]False[/Bot]
          [Bot Set="Copylearnto_fr"]True[/Bot]
          [User Set="Textentered"][/User]
          [Bot Set="Deltaspeed_leftright"]30[/Bot]
          [User Set="Workspeedleft"]100[/User]
          [User Set="Workspeedright"]100[/User]
          [Bot Set="EZmediafolder"]C:\Users\benar\OneDrive\Images\My Robot Pictures[/Bot]
          [User Set="EZMediafolder"][x:EZinfo Get="cameramediasavefolder" /][/User]
          [If User="EZMediafolder" Value=""][User Set="EZMediafolder"][Bot Get="EZmediafolder" /][/User][/If]
          [Bot Set="Listseparator_end_fr"] et [/Bot][Bot Set="Listseparator_end_en"] and [/Bot]
          [Bot Set="Listseparator_1_fr"] mais aussi [/Bot][Bot Set="Listseparator_1_en"] but also [/Bot]
          [Bot Set="Listseparator_2_fr"] et aussi [/Bot][Bot Set="Listseparator_2_en"] and finally [/Bot]
          [Var Set="Controlrobottype"][Map Get="typerobot"][User Get="Robottype" /][/Map][/Var]
  [!--test if Controlrobottype = RobotType in this case the robottype is not existing in the bot robot table - no control  depending on Robottype will be done after --]
  [!--User variable indrobot is set to the index to control in the flag arrays - if empty no control will be done--]
          [If Var="Controlrobottype" Value="{Bind User:Controlrobottype}"][User Set="indrobot"][/User][/If]
          [!--[Var Set="Okrobot"][x:Compare]{Bind Var:Controlrobottype}%equal%{Bind User:Controlrobottype}[/x:Compare][/Var]
          [If Var="Okrobot" Value="true"][User Set="indrobot"][/User][/If]--]
          [Else][User Set="indrobot"][Var Get="Controlrobottype" /][/User][/Else]
          [Switch User="Userlanguage"]
            [Case Value="fr"][x:EZcmd]ControlCommand("Speech Settings", SetVoice, "CereVoice Suzanne - French [France]")[/x:EZcmd][/Case]
            [Case Value="en"][x:EZcmd]ControlCommand("Speech Settings", SetVoice, "Microsoft Zira Desktop")[/x:EZcmd][/Case]
          [/Switch]
          [x:EZcmd]ControlCommand("Speech Settings", SetVoiceEmphasis, "Reduced")|ControlCommand("Speech Settings", SetVoiceRate, "Medium")[/x:EZcmd]
          [Switch User="Robottype"]
            [Case Value="JD"][Bot Set="robottypefr"]un robot humanoïde[/Bot][Bot Set="robottypeen"]an humanoid robot[/Bot][/Case]
            [Case Value="ROLLI"][Bot Set="robottypefr"]un robot à chenilles[/Bot][Bot Set="robottypeen"]a rolling rover robot[/Bot][/Case]
          [/Switch]
          [Bot Set="Empty-Response"]
            [Switch User="Userlanguage"]
              [Case Value="fr"][Random Get="Sorry_fr" /] JE NE SAIS PAS RéPONDRE à ta demande[/Case]
              [Case Value="en"][Random Get="Sorry_en" /] I Don't understand your request[/Case]
            [/Switch]
          [/Bot]
          [Bot Set="Timeout-Response"]
            [Switch User="Userlanguage"]
              [Case Value="fr"][Random Get="Sorry_fr" /][Random] Le temps nécessaire pour traiter ta demande est trop long[/Random][/Case]
              [Case Value="en"][Random Get="Sorry_en" /][Random] Your request has timed out[/Random][/Case]
            [/Switch]
          [/Bot]
        [/Think]
      [/Response]
    [/Event]

Bot Welcome

You can configure a user Welcome Message which will be automatically sent to the Bot after starting a Bot session and after the init Bot event management. Default is WELCOME TO SYNBOT

If user name is not set , a dialog is initiated by the Bot asking user to input his name. Userlanguage variable is tested to adapt bot dialogs and bot Below is the SIML models used in the example files to manage this welcome message. responses to the user language (fr and en are only supported in the example files)

[Model]
      [Pattern]
        [Item]WELCOME TO SYNBOT[/Item]
      [/Pattern]
      [Response xml:space="preserve"]
        [If User="Name" Value=""][Var Think:Set="Temp"]NameusernotOK[/Var][/If]
        [Else][Var Think:Set="Temp"]NameuserOK[/Var][/Else]
        [Goto xml:space="preserve"]WELCOME TO SYNBOT [Var Get="Temp" /] [User Get="Userlanguage" /][/Goto]
      [/Response]
    [/Model]
    
    [Model]
      [Pattern]
        [Item]WELCOME TO SYNBOT NAMEUSEROK FR[/Item]
      [/Pattern]
      [Response]
        [Random Get="Welcome_fr" /]
      [/Response]
    [/Model]
    
    [Model]
      [Pattern]
        [Item]WELCOME TO SYNBOT NAMEUSEROK EN[/Item]
      [/Pattern]
      [Response xml:space="preserve"]
        [Random Get="Welcome_en" /]
      [/Response]
    [/Model]
    
    [Model]
      [Pattern]
        [Item]WELCOME TO SYNBOT NAMEUSERNOTOK FR[/Item]
      [/Pattern]
      [Response xml:space="preserve"]
        [Label]:Setusername-fr[/Label]
        [User Think:Set="bot_event_response"][Random Get="Bienvenue_mess_fr" /]_[Random Get="Presentation_Name_fr_1" /] je suis [Bot Get="robottypefr" /] MAIS [Random Get="Je_ne_connais_pas_ton_nom_fr" /][/User]
        [/Response]
    [/Model]
    
    [Model]
      [Pattern]
        [Item]WELCOME TO SYNBOT NAMEUSERNOTOK EN[/Item]
      [/Pattern]
      [Response xml:space="preserve"]
        [Label]:Setusername-en[/Label]
        [User Think:Set="bot_event_response"][Random Get="Bienvenue_mess_en" /]_[Random Get="Presentation_Name_en_1" /] I'm [Bot Get="robottypeen" /] but [Random Get="Je_ne_connais_pas_ton_nom_en" /][/User]
        [/Response]
    [/Model]  
    [Model]
      [Pattern]
        [Item]JE M'APPELLE *~2[/Item]
        [Item]TU PEUX M'APPELER *~2[/Item]
        [Item]MON NOM EST *~2[/Item]
        [Item]MON PRÉNOM EST *~2[/Item]
        [Item]APPELLE MOI *~2[/Item]
        [Item]*~2[/Item]
      [/Pattern]
      [Previous]:Setusername-fr[/Previous]
      [Response xml:space="preserve"]
        [User Think:Set="Name"][Match /][/User]
        [Random]
          [Item][Random Get="Presentation_response_deb_fr_1" /]_[Random Get="Presentation_response_fin_fr" /][/Item]
          [Item][Random Get="Presentation_response_deb_fr" /] Je T'APPELERAI MAINTENANT [Match /][/Item]
          [Item][Random Get="Presentation_response_deb_fr" /] Je T'APPELERAI [Match /] à partir de maintenant[/Item]
        [/Random]
      [/Response]
    [/Model]  
    [Model]
      [Pattern]
        [Item]MY NAME IS *~2[/Item]
        [Item]YOU CAN CALL ME *~2[/Item]
        [Item]CALL ME *~2[/Item]
        [Item]*~2[/Item]
      [/Pattern]
      [Previous]:Setusername-en[/Previous]
      [Response xml:space="preserve"]
        [User Think:Set="Name"][Match /][/User]
        [Random]
          [Item][Random Get="Presentation_response_deb_en_1" /]_[Random Get="Presentation_response_fin_en" /][/Item]
          [Item][Random Get="Presentation_response_deb_en" /] I will call you [Match /][/Item]
          [Item][Random Get="Presentation_response_deb_en" /] I will call you [Match /] now[/Item]
        [/Random]
      [/Response]
    [/Model]

For example for a new userid "John"

User-inserted image

User-inserted image

Before Stop Bot event

You can configure a Bot Event which will be raised just after the Bot stop Command and just before the session finished. Default is BOT STOP EVENT You can do in the model used for this event some savings for the session (for example Bot and User variables value settings)

Below is the SIML model used in the example files to manage the Before Stop Event in sending to the user a Random Bye Message Response customized depending on the User language used.

User-inserted image

[Event]
      [Pattern]
        [Item]BOT STOP EVENT[/Item]
      [/Pattern]
        [Response xml:space="preserve"]
         [User Think:Set="EZMediafolder"][/User]
         [Random Get="Bye_Bye_{Bind User:Userlanguage}" /]
      [/Response]
    [/Event]
[Random Name="Bye_Bye_fr"]
    [Item xml:space="preserve"]AU REVOIR [User Get="Name" /] A BIENTOT[/Item]
    [Item xml:space="preserve"]AU REVOIR et A BIENTOT [User Get="Name" /][/Item]
    [Item xml:space="preserve"][Random Get="Bye_bye_part1_fr" /]_[Random Get="Bye_bye_part2_fr" /][/Item]
    [Item xml:space="preserve"][Random Get="Bye_bye_part1_fr" /]_[Random Get="Bye_bye_part2_fr" /]_[User Get="Name" /][/Item]
  [/Random]
  [Random Name="Bye_bye_part1_fr"](AU PLAISIR de te revoir bientot |REVIENS VITE me voir)[/Random]
  [Random Name="Bye_bye_part2_fr"](tu me manques déjà|_)[/Random]
  [Random Name="Bye_Bye_en"]
    [Item xml:space="preserve"][Random Get="Bye_end_en" /]_[User Get="Name" /]_[Random Get="See_You_next" /][/Item]
    [Item xml:space="preserve"][Random Get="Bye_end_en" /]_[Random Get="See_You_next" /]_[User Get="Name" /][/Item]
    [Item xml:space="preserve"][User Get="Name" /]_[Random Get="Bye_end_en" /]_[Random Get="See_You_next" /][/Item]
  [/Random]
  [Random Name="Bye_end_en"](Bye|Bye Bye|Pleased to meet you|Glad to meet you|It was a pleasure)[/Random]
  [Random Name="See_You_next"]
    [Item xml:space="preserve"]See You [Random Get="Bye_bye_part3_en" /][/Item]
    [Item xml:space="preserve"]I Miss You[/Item]
    [Item xml:space="preserve"]I Miss You already[/Item]
  [/Random]
  [Random Name="Bye_bye_part3_en"](next|soon|later|another time|_)[/Random]

Bot no match Message

You can configure a Message which will be automatically sent to the Bot when the plugin receive from the Bot an Empty answer Response. Default is BOT NO RESPONSE MESSAGE.

If there are no Match Patterns for a user query , Bot variable "Empty-Response" can be set to a message value. The message value Set will be returned as Response to the User. This Bot mechanism is also activated when the last response to a user request is Empty - It doesn't mean Response of the last model activated but Response of the first Model activated in the query ( It can be confusing with several GOTO ....) So you can decide of mechanism to use in setting or not a response in the last model activated in a GOTO chaining.

The plugin will consider that there's No Match when normal Bot Response message (Response of the first model activated) is empty and when variable used to store the Bot Response (User variable bot_event_response) is empty. In this case, if a Bot No Match Message is configured , it is send as querying request to the Bot. This mechanism allow to configure in the Bot no Match Message Model a customized message to be sent to the User in case of a Bot Empty Response (Generally due to an error in user input)

Below is the SIML models used in the example files to manage the Bot No Response Message with customization depending on the User language used.

[Model]
      [Pattern]
        [Item]BOT NO RESPONSE MESSAGE[/Item]
      [/Pattern]
      [Response xml:space="preserve"]
       [Think]
      	  [Var Set="Can_not_answer"]Can_not_answer_[User Get="Userlanguage" /][/Var]
    	  [Var Set="Sorry"]Sorry_[User Get="Userlanguage" /][/Var]	         	  
          [User Think:Set="bot_event_response"]
	        [Random]
	          [Item][Random Get="{Bind Var:Can_not_answer}" /][/Item]
	          [Item][Random Get="{Bind Var:Can_not_answer}" /]_[User Get="Name" /][/Item]
	          [Item][Random Get="{Bind Var:Sorry}" /]_[User Get="Name" /]_[Random Get="{Bind Var:Can_not_answer}" /][/Item]
	          [Item][Random Get="{Bind Var:Sorry}" /]_[Random Get="{Bind Var:Can_not_answer}" /][/Item]
	        [/Random]
 		  [/User]
 		[/Think]
      [/Response]
    [/Model]
[Random Name="Can_not_answer_fr"](Je ne sais pas répondre à ta demande|Je ne sais pas répondre)[/Random]
  [Random Name="Can_not_answer_en"](I can't respond to your request|I can't answer to your request|I can't answer|I can't respond)[/Random]
  [Random Name="Sorry_fr"](Je suis désolé|Désolé|_)[/Random]
  [Random Name="Sorry_en"](I'm sorry|Sorry| )[/Random]

Bot start and Stop Message

You can configure which text message will be used in an input use message , to start and stop the Bot. Useful for example in case of input done by the way of private twitter messages. Default are "Start Bot" and "Stop Bot"

Advanced Tab configuration Parameters

When you click on advanced tab, you get some additionnal configuration parameters.

User-inserted image

Bot Email Configuration

In order to be able to use the Mail SIML tag, you need to configure Bot/Robot Email parameters : Email address , Email Password , SMTP Server Address SMTP Server Port.

API Translate Configuration

In order to be able to use the Translate SIML tag, you need to input yout Text Translate API Key : Assigned by Microsoft in Azure when the Text_Translate service is created for your Account.

Bot Twitter Configuration

In order to be able to query the bot with Twitter private Messages and to use the Twitter SIML Tag , you need to Configure and Authorize Twitter Bot/Robot Account - Same process as Twitter account configuration in EZ Builder Option But allowing Private messages - It can be and it is better to use the same Bot/Robot Twitter Account as in Ez Builder global configuration. Check or Uncheck Tweet Bot Response Message to allow or not sending of Bot Text Response Message to the Twitter User who send the querying private message.

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.