Readme was missing
Browse files
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
|
| 13 |
+
# ChatHumanFlowModule
|
| 14 |
+
|
| 15 |
+
<a id="ChatHumanFlowModule.ChatHumanFlowModule"></a>
|
| 16 |
+
|
| 17 |
+
## ChatHumanFlowModule Objects
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
class ChatHumanFlowModule(CircularFlow)
|
| 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:
|
| 24 |
+
|
| 25 |
+
- A User Flow: A flow makes queries to the Assistant Flow. E.g. The user asks the assistant (LLM) a question.
|
| 26 |
+
- A Assistant Flow: A flow that responds to queries made by the User Flow. E.g. The assistant (LLM) answers the user's question.
|
| 27 |
+
|
| 28 |
+
To end the interaction, the user must type "\<END\>"
|
| 29 |
+
|
| 30 |
+
An illustration of the flow is as follows:
|
| 31 |
+
|
| 32 |
+
|------> User Flow -----------> |
|
| 33 |
+
^ |
|
| 34 |
+
| |
|
| 35 |
+
| v
|
| 36 |
+
|<------ Assistant Flow <-------|
|
| 37 |
+
|
| 38 |
+
*Configuration Parameters*:
|
| 39 |
+
|
| 40 |
+
- `name` (str): The name of the flow. Default: "ChatHumanFlowModule"
|
| 41 |
+
- `description` (str): A description of the flow. This description is used to generate the help message of the flow.
|
| 42 |
+
Default: "Flow that enables chatting between a ChatAtomicFlow and a user providing the input."
|
| 43 |
+
- `max_rounds` (int): The maximum number of rounds the flow can run for. Default: None, which means that there is no limit on the number of rounds.
|
| 44 |
+
- `early_exit_key` (str): The key that is used to exit the flow. Default: "end_of_interaction"
|
| 45 |
+
- `subflows_config` (Dict[str,Any]): A dictionary of subflows configurations. Default:
|
| 46 |
+
- `Assistant Flow`: The configuration of the Assistant Flow. By default, it a ChatAtomicFlow. It default parmaters are defined in ChatAtomicFlowModule.
|
| 47 |
+
- `User Flow`: The configuration of the User Flow. By default, it a HumanStandardInputFlow. It default parmaters are defined in HumanStandardInputFlowModule.
|
| 48 |
+
- `topology` (str): (List[Dict[str,Any]]): The topology of the flow which is "circular".
|
| 49 |
+
By default, the topology is the one shown in the illustration above (the topology is also described in ChatHumanFlowModule.yaml).
|
| 50 |
+
|
| 51 |
+
*Input Interface*:
|
| 52 |
+
|
| 53 |
+
- None. By default, the input interface doesn't expect any input.
|
| 54 |
+
|
| 55 |
+
*Output Interface*:
|
| 56 |
+
|
| 57 |
+
- `end_of_interaction` (bool): Whether the interaction is finished or not.
|
| 58 |
+
|
| 59 |
+
**Arguments**:
|
| 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
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
@classmethod
|
| 69 |
+
def type(cls)
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
This method returns the type of the flow.
|
| 73 |
+
|