Proper Doc
Browse files
README.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
-
|
| 5 |
# Table of Contents
|
| 6 |
|
| 7 |
* [ChatHumanFlowModule](#ChatHumanFlowModule)
|
| 8 |
* [ChatHumanFlowModule](#ChatHumanFlowModule.ChatHumanFlowModule)
|
|
|
|
| 9 |
* [type](#ChatHumanFlowModule.ChatHumanFlowModule.type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
<a id="ChatHumanFlowModule"></a>
|
| 12 |
|
|
@@ -17,7 +22,7 @@ license: mit
|
|
| 17 |
## ChatHumanFlowModule Objects
|
| 18 |
|
| 19 |
```python
|
| 20 |
-
class ChatHumanFlowModule(
|
| 21 |
```
|
| 22 |
|
| 23 |
This class implements a Chat Human Flow Module. It is a flow that consists of two sub-flows that are executed circularly. It Contains the following subflows:
|
|
@@ -60,6 +65,16 @@ By default, the topology is the one shown in the illustration above (the topolog
|
|
| 60 |
|
| 61 |
- `\**kwargs` (`Dict[str, Any]`): Arguments to be passed to the parent class CircularFlow constructor.
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
<a id="ChatHumanFlowModule.ChatHumanFlowModule.type"></a>
|
| 64 |
|
| 65 |
#### type
|
|
@@ -71,3 +86,69 @@ def type(cls)
|
|
| 71 |
|
| 72 |
This method returns the type of the flow.
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
| 4 |
# Table of Contents
|
| 5 |
|
| 6 |
* [ChatHumanFlowModule](#ChatHumanFlowModule)
|
| 7 |
* [ChatHumanFlowModule](#ChatHumanFlowModule.ChatHumanFlowModule)
|
| 8 |
+
* [set\_up\_flow\_state](#ChatHumanFlowModule.ChatHumanFlowModule.set_up_flow_state)
|
| 9 |
* [type](#ChatHumanFlowModule.ChatHumanFlowModule.type)
|
| 10 |
+
* [max\_rounds\_reached](#ChatHumanFlowModule.ChatHumanFlowModule.max_rounds_reached)
|
| 11 |
+
* [generate\_reply](#ChatHumanFlowModule.ChatHumanFlowModule.generate_reply)
|
| 12 |
+
* [call\_to\_user](#ChatHumanFlowModule.ChatHumanFlowModule.call_to_user)
|
| 13 |
+
* [call\_to\_assistant](#ChatHumanFlowModule.ChatHumanFlowModule.call_to_assistant)
|
| 14 |
+
* [run](#ChatHumanFlowModule.ChatHumanFlowModule.run)
|
| 15 |
|
| 16 |
<a id="ChatHumanFlowModule"></a>
|
| 17 |
|
|
|
|
| 22 |
## ChatHumanFlowModule Objects
|
| 23 |
|
| 24 |
```python
|
| 25 |
+
class ChatHumanFlowModule(CompositeFlow)
|
| 26 |
```
|
| 27 |
|
| 28 |
This class implements a Chat Human Flow Module. It is a flow that consists of two sub-flows that are executed circularly. It Contains the following subflows:
|
|
|
|
| 65 |
|
| 66 |
- `\**kwargs` (`Dict[str, Any]`): Arguments to be passed to the parent class CircularFlow constructor.
|
| 67 |
|
| 68 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule.set_up_flow_state"></a>
|
| 69 |
+
|
| 70 |
+
#### set\_up\_flow\_state
|
| 71 |
+
|
| 72 |
+
```python
|
| 73 |
+
def set_up_flow_state()
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
This method sets up the flow state. It is called when the flow is executed.
|
| 77 |
+
|
| 78 |
<a id="ChatHumanFlowModule.ChatHumanFlowModule.type"></a>
|
| 79 |
|
| 80 |
#### type
|
|
|
|
| 86 |
|
| 87 |
This method returns the type of the flow.
|
| 88 |
|
| 89 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule.max_rounds_reached"></a>
|
| 90 |
+
|
| 91 |
+
#### max\_rounds\_reached
|
| 92 |
+
|
| 93 |
+
```python
|
| 94 |
+
def max_rounds_reached()
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
This method checks if the maximum number of rounds has been reached. If the maximum number of rounds has been reached, it returns True. Otherwise, it returns False.
|
| 98 |
+
|
| 99 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule.generate_reply"></a>
|
| 100 |
+
|
| 101 |
+
#### generate\_reply
|
| 102 |
+
|
| 103 |
+
```python
|
| 104 |
+
def generate_reply()
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
This method generates the reply message. It is called when the interaction is finished.
|
| 108 |
+
|
| 109 |
+
**Arguments**:
|
| 110 |
+
|
| 111 |
+
- `input_message` (`FlowMessage`): The input message to the flow.
|
| 112 |
+
|
| 113 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule.call_to_user"></a>
|
| 114 |
+
|
| 115 |
+
#### call\_to\_user
|
| 116 |
+
|
| 117 |
+
```python
|
| 118 |
+
def call_to_user(input_message)
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
This method calls the User Flow. (Human)
|
| 122 |
+
|
| 123 |
+
**Arguments**:
|
| 124 |
+
|
| 125 |
+
- `input_message` (`FlowMessage`): The input message to the flow.
|
| 126 |
+
|
| 127 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule.call_to_assistant"></a>
|
| 128 |
+
|
| 129 |
+
#### call\_to\_assistant
|
| 130 |
+
|
| 131 |
+
```python
|
| 132 |
+
def call_to_assistant(input_message)
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
This method calls the Assistant Flow.
|
| 136 |
+
|
| 137 |
+
**Arguments**:
|
| 138 |
+
|
| 139 |
+
- `input_message` (`FlowMessage`): The input message to the flow.
|
| 140 |
+
|
| 141 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule.run"></a>
|
| 142 |
+
|
| 143 |
+
#### run
|
| 144 |
+
|
| 145 |
+
```python
|
| 146 |
+
def run(input_message: FlowMessage)
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
This method runs the flow. It is the main method of the flow and it is called when the flow is executed.
|
| 150 |
+
|
| 151 |
+
**Arguments**:
|
| 152 |
+
|
| 153 |
+
- `input_message` (`FlowMessage`): The input message to the flow.
|
| 154 |
+
|