|
@@ -18,7 +18,7 @@ Let's take a look on a basic synapse in our brain:
|
|
|
|
|
|
```
|
|
```
|
|
---
|
|
---
|
|
- - name: "Say hello"
|
|
|
|
|
|
+ - name: "Say-hello"
|
|
neurons:
|
|
neurons:
|
|
- say:
|
|
- say:
|
|
message: "Hello, sir"
|
|
message: "Hello, sir"
|
|
@@ -36,9 +36,9 @@ This is a requirement for YAML to interpret the file as a proper document.
|
|
|
|
|
|
Items that begin with a ```-``` are considered as list items. Items have the format of ```key: value``` where value can be a simple string or a sequence of other items.
|
|
Items that begin with a ```-``` are considered as list items. Items have the format of ```key: value``` where value can be a simple string or a sequence of other items.
|
|
|
|
|
|
-At the top level we have a "name" tag. This is the **unique identifier** of the synapse. It must be unique to each synapse and should not contain any accent.
|
|
|
|
|
|
+At the top level we have a "name" tag. This is the **unique identifier** of the synapse. It must be an unique word with the only accepted values : alphanumerics and dash. ([a - zA - Z0 - 9\-])
|
|
```
|
|
```
|
|
-- name: "Say hello"
|
|
|
|
|
|
+- name: "Say-hello"
|
|
```
|
|
```
|
|
|
|
|
|
Then we have the neurons declaration. Neurons are modules that will be executed when the input action is triggered. You can define as many neurons as you want to the same input action (for example: say somethning, then do something etc...). This declaration contains a list (because it starts with a "-") of neurons
|
|
Then we have the neurons declaration. Neurons are modules that will be executed when the input action is triggered. You can define as many neurons as you want to the same input action (for example: say somethning, then do something etc...). This declaration contains a list (because it starts with a "-") of neurons
|
|
@@ -67,7 +67,7 @@ The last part, called **signals** is a list of input actions. This works exactly
|
|
In the following example, we use just one signal, an order. See the complete list of [available signals](signals.md) here.
|
|
In the following example, we use just one signal, an order. See the complete list of [available signals](signals.md) here.
|
|
```
|
|
```
|
|
signals:
|
|
signals:
|
|
- - order: "say hello"
|
|
|
|
|
|
+ - order: "say-hello"
|
|
```
|
|
```
|
|
|
|
|
|
You can add as many orders as you want for the signals. Even if literally they do not mean the same thing (For example order "say hello" and order "adventure" or whatever) as long they are in the same synaps, they will trigger the same action defined in neurons.
|
|
You can add as many orders as you want for the signals. Even if literally they do not mean the same thing (For example order "say hello" and order "adventure" or whatever) as long they are in the same synaps, they will trigger the same action defined in neurons.
|
|
@@ -84,14 +84,14 @@ To know if your order will be triggered by Kalliope, we recommend you to [use th
|
|
>**Note:**
|
|
>**Note:**
|
|
You must pay attention to define the orders as precise as possible. As Kalliope is based on matching, if you define your orders in different synapses too similiary, Kalliope risks to trigger more actions that you were expecting. For exemple, if you define two different synapses as shown below:
|
|
You must pay attention to define the orders as precise as possible. As Kalliope is based on matching, if you define your orders in different synapses too similiary, Kalliope risks to trigger more actions that you were expecting. For exemple, if you define two different synapses as shown below:
|
|
```
|
|
```
|
|
-- name: "Say hello"
|
|
|
|
|
|
+- name: "Say-hello"
|
|
...
|
|
...
|
|
signals:
|
|
signals:
|
|
- order: "say hello"
|
|
- order: "say hello"
|
|
```
|
|
```
|
|
and
|
|
and
|
|
```
|
|
```
|
|
-- name: "Say something"
|
|
|
|
|
|
+- name: "Say-something"
|
|
...
|
|
...
|
|
signals:
|
|
signals:
|
|
- order: "say"
|
|
- order: "say"
|