martinjosifoski commited on
Commit
65fbdbe
·
1 Parent(s): 66a3eec

First commit.

Browse files
Files changed (3) hide show
  1. README.md +15 -0
  2. __init__.py +1 -0
  3. fixed_reply.py +21 -0
README.md CHANGED
@@ -1,3 +1,18 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+ ## Description
5
+
6
+ Replies with a fixed message.
7
+
8
+ ## Configuration parameters
9
+
10
+ fixed_reply (String): The string specifying the reply. Required parameter.
11
+
12
+ ## Input interface
13
+
14
+ The Flow does not expect any input.
15
+
16
+ ## Output interface
17
+
18
+ fixed_reply (String): The string specifying the reply.
__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from .fixed_reply import FixedReplyFlow
fixed_reply.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Dict, Any
2
+
3
+ from flows.base_flows import AtomicFlow
4
+
5
+
6
+ class FixedReplyFlow(AtomicFlow):
7
+ REQUIRED_KEYS_CONFIG = ["fixed_reply"]
8
+
9
+ __default_flow_config = {
10
+ "input_interface": [],
11
+ "output_interface": ["fixed_reply"],
12
+ }
13
+
14
+ def __init__(self, **kwargs):
15
+ super().__init__(**kwargs)
16
+
17
+ def run(self,
18
+ input_data: Dict[str, Any]) -> Dict[str, Any]:
19
+
20
+ return {"fixed_reply": self.flow_config["fixed_reply"]}
21
+