Update main.py
Browse files
main.py
CHANGED
|
@@ -103,6 +103,19 @@ async def on_chat_start():
|
|
| 103 |
),
|
| 104 |
]
|
| 105 |
).send()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
template = """Answer the question based only on the following context:
|
| 107 |
|
| 108 |
{context}
|
|
|
|
| 103 |
),
|
| 104 |
]
|
| 105 |
).send()
|
| 106 |
+
res = await cl.AskActionMessage(
|
| 107 |
+
content="",
|
| 108 |
+
actions=[
|
| 109 |
+
cl.Action(name="continue", value="continue", label="<p><strong>✅ Continue</strong></p>"),
|
| 110 |
+
cl.Action(name="cancel", value="cancel", label="<img src='./public/learn.svg' /><p>Cancel</p>"),
|
| 111 |
+
],
|
| 112 |
+
).send()
|
| 113 |
+
|
| 114 |
+
if res and res.get("value") == "continue":
|
| 115 |
+
await cl.Message(
|
| 116 |
+
content="On continue!",
|
| 117 |
+
).send()
|
| 118 |
+
|
| 119 |
template = """Answer the question based only on the following context:
|
| 120 |
|
| 121 |
{context}
|