BotSettings
Annotation | <BotSettings> |
---|---|
Definition | Groups variables that belong to the Bot. |
Children | MUST contain one or more <Variable> elements |
Occurrence | One <BotSettings> element MAY occur within an <Siml> element. |
This element stores internal values for the Bot. Many of the values are used during Bot initialization and tells the Bot in what environment its supposed to run. In Syn Bot Framework We have optimized retrieval of stored values to great extent ensuring that a large collection of Bot settings will not affect the Bot’s performance.
BotSettings
element takes one or more Variable
element as its children and every child element stores single or multiple values.
Example - SIML Classic and SIML Modern
<Siml>
<BotSettings>
<Variable Name="Favorite_Movies">
<Value>Contact</Value>
<Value>God Father</Value>
<Value>Life Is Beautiful</Value>
<Value>Green Miles</Value>
</Variable>
<Variable Name="Version" Value="1.0"/>
<Variable Name="Name" Value="Unknown" />
<Variable Name="Location" Value="Bangalore, India" />
<Variable Name="Gender" Value="Female" />
<Variable Name="Culture" Value="en-US" />
</BotSettings>
</Siml>
Example - SIML Classic
<Model>
<Pattern>What version are you</Pattern>
<Response>
I am version <Bot Get="version"/>
</Response>
</Model>
Example - SIML Modern
<Intent>
<Expression Value="What version are you?"/>
<Response>
I am version <Bot Get="version"/>
</Response>
</Intent>
User Input
What version are you?
Bot Output
I am version 1.0
Explanation
The
Bot
element is used to retrieve bot related settings/predicates and their values. The value of theGet
attribute represents the Settings name.
Reserved Bot Variables (SIML Classic)
Certain Bot Variables are reserved to help the developer customize the behavior of the interpreter without having to hard-code them in a .Net Application.
Variable Name | Function |
---|---|
Empty-Response | The value of this variable is submitted to the user if the Bot for some unknown reason is not able to generate an output. If this is due to an error then the LogAdded event of the Bot will also be fired along with the response. |
Empty-Match | The value of this variable is used when a match element (<Match> , <PreviousMatch> , <ConceptMatch> ) is present in a Model but the length of the value matched by the element is zero. |
Timeout-Response | The value of this variable is submitted to the user if the chat request is timed out. Currently, this response is also used when long or infinite loops are encountered. |
Culture | The value of this variable should be a valid culture name as specified in National Language Support (NLS) API Reference. This value is used by the interpreter to make internal modifications when working with strings. |
Max-Request-Length | The value of this variable is the maximum number of individual characters that are allowed in a Chat request. If exceeded then a Timedout-Response is sent to the user. The default value for this variable is 250 characters. |
Emotion | The value of this variable is the default emotion a Bot attains when it’s initialized. The value should a valid emotion name declared within the emotionml document using the SIML namespace. |
List-Separator | The value of this variable is used as a delimiter when the List attribute is used on a variable. |
List-End | The value of this variable is used as the last delimiter when the List attribute is used on a variable. |
Default | The value of this variable is used when a Get attribute is used to retrieve the value of a non-existent variable. |
Undefined | The value of this variable is used to determine if a variable is defined or not. If a variable has the same value as the value of the Undefined variable then the variable is considered undefined. The default value of this variable is an empty string. |
The integer value of this variable is used to determine the maximum number of while loops allowed. | |
The time in milliseconds to stop evaluating the chat request if no response is generated. |