NaderAfshar commited on
Commit
f5f5f81
·
1 Parent(s): 6cdd178

Commiting updated files before refining

Browse files
Files changed (1) hide show
  1. workflows/RAG-EventDriven.html +155 -0
workflows/RAG-EventDriven.html ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 100%;
36
+ height: 750px;
37
+ background-color: #ffffff;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+
47
+
48
+ </style>
49
+ </head>
50
+
51
+
52
+ <body>
53
+ <div class="card" style="width: 100%">
54
+
55
+
56
+ <div id="mynetwork" class="card-body"></div>
57
+ </div>
58
+
59
+
60
+
61
+
62
+ <script type="text/javascript">
63
+
64
+ // initialize global variables.
65
+ var edges;
66
+ var nodes;
67
+ var allNodes;
68
+ var allEdges;
69
+ var nodeColors;
70
+ var originalNodes;
71
+ var network;
72
+ var container;
73
+ var options, data;
74
+ var filter = {
75
+ item : '',
76
+ property : '',
77
+ value : []
78
+ };
79
+
80
+
81
+
82
+
83
+
84
+ // This method is responsible for drawing the graph, returns the drawn network
85
+ function drawGraph() {
86
+ var container = document.getElementById('mynetwork');
87
+
88
+
89
+
90
+ // parsing and collecting nodes and edges from the python
91
+ nodes = new vis.DataSet([{"color": "#FFA07A", "id": "StopEvent", "label": "StopEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "_done", "label": "_done", "shape": "box"}, {"color": "#ADD8E6", "id": "ask_question", "label": "ask_question", "shape": "box"}, {"color": "#90EE90", "id": "QueryEvent", "label": "QueryEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "fill_in_application", "label": "fill_in_application", "shape": "box"}, {"color": "#90EE90", "id": "ResponseEvent", "label": "ResponseEvent", "shape": "ellipse"}, {"color": "#90EE90", "id": "InputRequiredEvent", "label": "InputRequiredEvent", "shape": "ellipse"}, {"color": "#BEDAE4", "id": "external_step", "label": "external_step", "shape": "box"}, {"color": "#ADD8E6", "id": "generate_questions", "label": "generate_questions", "shape": "box"}, {"color": "#90EE90", "id": "GenerateQuestionsEvent", "label": "GenerateQuestionsEvent", "shape": "ellipse"}, {"color": "#90EE90", "id": "FeedbackEvent", "label": "FeedbackEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "get_feedback", "label": "get_feedback", "shape": "box"}, {"color": "#90EE90", "id": "HumanResponseEvent", "label": "HumanResponseEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "parse_form", "label": "parse_form", "shape": "box"}, {"color": "#90EE90", "id": "ParseFormEvent", "label": "ParseFormEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "set_up", "label": "set_up", "shape": "box"}, {"color": "#E27AFF", "id": "StartEvent", "label": "StartEvent", "shape": "ellipse"}]);
92
+ edges = new vis.DataSet([{"arrows": "to", "from": "StopEvent", "to": "_done"}, {"arrows": "to", "from": "ask_question", "to": "ResponseEvent"}, {"arrows": "to", "from": "QueryEvent", "to": "ask_question"}, {"arrows": "to", "from": "fill_in_application", "to": "InputRequiredEvent"}, {"arrows": "to", "from": "InputRequiredEvent", "to": "external_step"}, {"arrows": "to", "from": "ResponseEvent", "to": "fill_in_application"}, {"arrows": "to", "from": "generate_questions", "to": "QueryEvent"}, {"arrows": "to", "from": "GenerateQuestionsEvent", "to": "generate_questions"}, {"arrows": "to", "from": "FeedbackEvent", "to": "generate_questions"}, {"arrows": "to", "from": "get_feedback", "to": "FeedbackEvent"}, {"arrows": "to", "from": "get_feedback", "to": "StopEvent"}, {"arrows": "to", "from": "HumanResponseEvent", "to": "get_feedback"}, {"arrows": "to", "from": "external_step", "to": "HumanResponseEvent"}, {"arrows": "to", "from": "parse_form", "to": "GenerateQuestionsEvent"}, {"arrows": "to", "from": "ParseFormEvent", "to": "parse_form"}, {"arrows": "to", "from": "set_up", "to": "ParseFormEvent"}, {"arrows": "to", "from": "StartEvent", "to": "set_up"}]);
93
+
94
+ nodeColors = {};
95
+ allNodes = nodes.get({ returnType: "Object" });
96
+ for (nodeId in allNodes) {
97
+ nodeColors[nodeId] = allNodes[nodeId].color;
98
+ }
99
+ allEdges = edges.get({ returnType: "Object" });
100
+ // adding nodes and edges to the graph
101
+ data = {nodes: nodes, edges: edges};
102
+
103
+ var options = {
104
+ "configure": {
105
+ "enabled": false
106
+ },
107
+ "edges": {
108
+ "color": {
109
+ "inherit": true
110
+ },
111
+ "smooth": {
112
+ "enabled": true,
113
+ "type": "dynamic"
114
+ }
115
+ },
116
+ "interaction": {
117
+ "dragNodes": true,
118
+ "hideEdgesOnDrag": false,
119
+ "hideNodesOnDrag": false
120
+ },
121
+ "physics": {
122
+ "enabled": true,
123
+ "stabilization": {
124
+ "enabled": true,
125
+ "fit": true,
126
+ "iterations": 1000,
127
+ "onlyDynamicEdges": false,
128
+ "updateInterval": 50
129
+ }
130
+ }
131
+ };
132
+
133
+
134
+
135
+
136
+
137
+
138
+ network = new vis.Network(container, data, options);
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ return network;
150
+
151
+ }
152
+ drawGraph();
153
+ </script>
154
+ </body>
155
+ </html>