plan
Browse files- agent_reference_app..drawio +129 -0
- controller.py +2 -1
agent_reference_app..drawio
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<mxfile host="65bd71144e">
|
| 2 |
+
<diagram id="t3WmjOAWM_RWWYqzVFG-" name="Page-1">
|
| 3 |
+
<mxGraphModel dx="2342" dy="700" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
| 4 |
+
<root>
|
| 5 |
+
<mxCell id="0"/>
|
| 6 |
+
<mxCell id="1" parent="0"/>
|
| 7 |
+
<mxCell id="45" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#FFFFFF;fillColor=none;" vertex="1" parent="1">
|
| 8 |
+
<mxGeometry y="170" width="420" height="480" as="geometry"/>
|
| 9 |
+
</mxCell>
|
| 10 |
+
<mxCell id="39" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#FFFFFF;fillColor=none;" vertex="1" parent="1">
|
| 11 |
+
<mxGeometry x="680" y="190" width="190" height="400" as="geometry"/>
|
| 12 |
+
</mxCell>
|
| 13 |
+
<mxCell id="38" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#FFFFFF;fillColor=none;" vertex="1" parent="1">
|
| 14 |
+
<mxGeometry x="454" y="170" width="190" height="480" as="geometry"/>
|
| 15 |
+
</mxCell>
|
| 16 |
+
<mxCell id="2" value="Actor" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1">
|
| 17 |
+
<mxGeometry x="-155" y="230" width="30" height="60" as="geometry"/>
|
| 18 |
+
</mxCell>
|
| 19 |
+
<mxCell id="5" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="4">
|
| 20 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 21 |
+
</mxCell>
|
| 22 |
+
<mxCell id="9" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="8">
|
| 23 |
+
<mxGeometry relative="1" as="geometry">
|
| 24 |
+
<Array as="points"/>
|
| 25 |
+
</mxGeometry>
|
| 26 |
+
</mxCell>
|
| 27 |
+
<mxCell id="11" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="10">
|
| 28 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 29 |
+
</mxCell>
|
| 30 |
+
<mxCell id="13" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="12">
|
| 31 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 32 |
+
</mxCell>
|
| 33 |
+
<mxCell id="3" value="App.py" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 34 |
+
<mxGeometry x="-200" y="392" width="120" height="60" as="geometry"/>
|
| 35 |
+
</mxCell>
|
| 36 |
+
<mxCell id="7" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="6">
|
| 37 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 38 |
+
</mxCell>
|
| 39 |
+
<mxCell id="15" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="14">
|
| 40 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 41 |
+
</mxCell>
|
| 42 |
+
<mxCell id="17" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="16">
|
| 43 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 44 |
+
</mxCell>
|
| 45 |
+
<mxCell id="19" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="18">
|
| 46 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 47 |
+
</mxCell>
|
| 48 |
+
<mxCell id="34" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="33">
|
| 49 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 50 |
+
</mxCell>
|
| 51 |
+
<mxCell id="37" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4" target="36">
|
| 52 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 53 |
+
</mxCell>
|
| 54 |
+
<mxCell id="4" value="Controller" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 55 |
+
<mxGeometry x="130" y="392" width="120" height="60" as="geometry"/>
|
| 56 |
+
</mxCell>
|
| 57 |
+
<mxCell id="6" value="AppConfig" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 58 |
+
<mxGeometry x="40" y="210" width="120" height="60" as="geometry"/>
|
| 59 |
+
</mxCell>
|
| 60 |
+
<mxCell id="8" value="AppSidebar" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 61 |
+
<mxGeometry x="-400" y="520" width="120" height="60" as="geometry"/>
|
| 62 |
+
</mxCell>
|
| 63 |
+
<mxCell id="10" value="AppChat<br>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 64 |
+
<mxGeometry x="-390" y="390" width="120" height="60" as="geometry"/>
|
| 65 |
+
</mxCell>
|
| 66 |
+
<mxCell id="12" value="AppHeader<br>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 67 |
+
<mxGeometry x="-390" y="220" width="120" height="60" as="geometry"/>
|
| 68 |
+
</mxCell>
|
| 69 |
+
<mxCell id="21" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 70 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 71 |
+
</mxCell>
|
| 72 |
+
<mxCell id="22" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 73 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 74 |
+
</mxCell>
|
| 75 |
+
<mxCell id="23" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 76 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 77 |
+
</mxCell>
|
| 78 |
+
<mxCell id="24" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 79 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 80 |
+
</mxCell>
|
| 81 |
+
<mxCell id="25" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 82 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 83 |
+
</mxCell>
|
| 84 |
+
<mxCell id="26" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 85 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 86 |
+
</mxCell>
|
| 87 |
+
<mxCell id="27" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 88 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 89 |
+
</mxCell>
|
| 90 |
+
<mxCell id="29" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="20">
|
| 91 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 92 |
+
</mxCell>
|
| 93 |
+
<mxCell id="31" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="30">
|
| 94 |
+
<mxGeometry relative="1" as="geometry"/>
|
| 95 |
+
</mxCell>
|
| 96 |
+
<mxCell id="14" value="CustomHFAgent" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 97 |
+
<mxGeometry x="490" y="420" width="120" height="60" as="geometry"/>
|
| 98 |
+
</mxCell>
|
| 99 |
+
<mxCell id="16" value="Conversation" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 100 |
+
<mxGeometry x="490" y="520" width="120" height="60" as="geometry"/>
|
| 101 |
+
</mxCell>
|
| 102 |
+
<mxCell id="18" value="ContetAnalysis" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#ea1010;" vertex="1" parent="1">
|
| 103 |
+
<mxGeometry x="490" y="220" width="120" height="60" as="geometry"/>
|
| 104 |
+
</mxCell>
|
| 105 |
+
<mxCell id="20" value="Various Tools" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 106 |
+
<mxGeometry x="715" y="345" width="120" height="60" as="geometry"/>
|
| 107 |
+
</mxCell>
|
| 108 |
+
<mxCell id="30" value="VaroiusToolChains" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
| 109 |
+
<mxGeometry x="715" y="490" width="120" height="60" as="geometry"/>
|
| 110 |
+
</mxCell>
|
| 111 |
+
<mxCell id="32" value="..." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 112 |
+
<mxGeometry x="740" y="435" width="70" height="30" as="geometry"/>
|
| 113 |
+
</mxCell>
|
| 114 |
+
<mxCell id="33" value="Tools" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
| 115 |
+
<mxGeometry x="250" y="210" width="120" height="60" as="geometry"/>
|
| 116 |
+
</mxCell>
|
| 117 |
+
<mxCell id="35" value="<h1>Agent Refernece Implementation</h1><p>The app first load the Controller with the Configs App/Tool) and passes it to to views. On submit the controller invokes a chain of models.&nbsp;</p>" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" vertex="1" parent="1">
|
| 118 |
+
<mxGeometry x="15" y="50" width="455" height="120" as="geometry"/>
|
| 119 |
+
</mxCell>
|
| 120 |
+
<mxCell id="36" value="Semantik Routing" style="whiteSpace=wrap;html=1;rounded=1;strokeColor=#ce1212;" vertex="1" parent="1">
|
| 121 |
+
<mxGeometry x="490" y="320" width="120" height="60" as="geometry"/>
|
| 122 |
+
</mxCell>
|
| 123 |
+
<mxCell id="40" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#FFFFFF;fillColor=none;" vertex="1" parent="1">
|
| 124 |
+
<mxGeometry x="-440" y="170" width="420" height="480" as="geometry"/>
|
| 125 |
+
</mxCell>
|
| 126 |
+
</root>
|
| 127 |
+
</mxGraphModel>
|
| 128 |
+
</diagram>
|
| 129 |
+
</mxfile>
|
controller.py
CHANGED
|
@@ -87,8 +87,9 @@ class Controller:
|
|
| 87 |
- str: The response from the conversation chain.
|
| 88 |
"""
|
| 89 |
agent_chat_bot = ConversationChainSingleton().get_conversation_chain()
|
|
|
|
| 90 |
print("------------ msg -----------------------")
|
| 91 |
-
print(user_message + " ---- "
|
| 92 |
print("------------ /msg -----------------------")
|
| 93 |
if agent_response is not None:
|
| 94 |
text = agent_chat_bot.predict(input=user_message + agent_response)
|
|
|
|
| 87 |
- str: The response from the conversation chain.
|
| 88 |
"""
|
| 89 |
agent_chat_bot = ConversationChainSingleton().get_conversation_chain()
|
| 90 |
+
print(agent_chat_bot)
|
| 91 |
print("------------ msg -----------------------")
|
| 92 |
+
print(user_message + " ---- " )
|
| 93 |
print("------------ /msg -----------------------")
|
| 94 |
if agent_response is not None:
|
| 95 |
text = agent_chat_bot.predict(input=user_message + agent_response)
|