فهرست منبع

[Feature] Add an example in Doc

monf 8 سال پیش
والد
کامیت
be1b72b6f4
2فایلهای تغییر یافته به همراه18 افزوده شده و 3 حذف شده
  1. 2 3
      brain.yml
  2. 16 0
      neurons/Openweathermap/README.md

+ 2 - 3
brain.yml

@@ -14,12 +14,11 @@
           api_key: "your-api"
           lang: "fr"
           temp_unit: "celsius"
+          location : "grenoble"
           say_template:
           - "Aujourd'hui a {{ location }} le temps est {{ weather_today }} avec une température de {{ temp_today_temp }} degrés et demain le temps sera {{ weather_tomorrow }} avec une température de {{ temp_tomorrow_temp }} degrés"
-          args:
-          - location
     signals:
-      - order: "quel temps fait-il à {{ location }}"
+      - order: "quel temps fait-il "
 
   - name: "say hello"
     neurons:

+ 16 - 0
neurons/Openweathermap/README.md

@@ -65,6 +65,22 @@ Give the today and tomorrow weather with the related data (humidity, temperature
 
 ```
 
+You also can define the "location" args directly in neuron argument list. 
+
+```
+  - name: "get the weather"
+    neurons:
+      - openweathermap:
+          api_key: "fdfba4097c318aed7836b2a85a6a05ef"
+          lang: "fr"
+          temp_unit: "celsius"
+          location : "grenoble"
+          say_template:
+          - "Aujourd'hui a {{ location }} le temps est {{ weather_today }} avec une température de {{ temp_today_temp }} degrés et demain le temps sera {{ weather_tomorrow }} avec une température de {{ temp_tomorrow_temp }} degrés"
+    signals:
+      - order: "quel temps fait-il "
+```
+
 ## Templates example