refreshed
Browse files- .vscode/launch.json +20 -0
- app.py +10 -9
.vscode/launch.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
// Use IntelliSense to learn about possible attributes.
|
| 3 |
+
// Hover to view descriptions of existing attributes.
|
| 4 |
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
| 5 |
+
"version": "0.2.0",
|
| 6 |
+
"configurations": [
|
| 7 |
+
{
|
| 8 |
+
"name": "chainlit",
|
| 9 |
+
"type": "debugpy",
|
| 10 |
+
"request": "launch",
|
| 11 |
+
"module": "chainlit",
|
| 12 |
+
"args": [
|
| 13 |
+
"run",
|
| 14 |
+
"/Users/pmui/SynologyDrive/projects/llmops/aie2/homework/midterm/meta2023/app.py",
|
| 15 |
+
"-w"
|
| 16 |
+
],
|
| 17 |
+
"jinja": true
|
| 18 |
+
}
|
| 19 |
+
]
|
| 20 |
+
}
|
app.py
CHANGED
|
@@ -43,18 +43,18 @@ async def main(message: cl.Message):
|
|
| 43 |
async def start():
|
| 44 |
|
| 45 |
_logger.info("==> starting ...")
|
| 46 |
-
await cl.Avatar(
|
| 47 |
-
name="Chatbot",
|
| 48 |
-
url="https://cdn-icons-png.flaticon.com/512/8649/8649595.png"
|
| 49 |
-
).send()
|
| 50 |
-
await cl.Avatar(
|
| 51 |
-
name="User",
|
| 52 |
-
url="https://media.architecturaldigest.com/photos/5f241de2c850b2a36b415024/master/w_1600%2Cc_limit/Luke-logo.png"
|
| 53 |
-
).send()
|
| 54 |
-
|
| 55 |
global _semantic_rag_chain
|
| 56 |
_semantic_rag_chain = SemanticRAGChainFactory.get_semantic_rag_chain()
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
_logger.info("\tsending message back: ready!!!")
|
| 59 |
|
| 60 |
content = ""
|
|
@@ -76,3 +76,4 @@ async def start():
|
|
| 76 |
await cl.Message(
|
| 77 |
content=content + "\nHow can I help you with Meta's 2023 10K?"
|
| 78 |
).send()
|
|
|
|
|
|
| 43 |
async def start():
|
| 44 |
|
| 45 |
_logger.info("==> starting ...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
global _semantic_rag_chain
|
| 47 |
_semantic_rag_chain = SemanticRAGChainFactory.get_semantic_rag_chain()
|
| 48 |
|
| 49 |
+
# await cl.Avatar(
|
| 50 |
+
# name="Chatbot",
|
| 51 |
+
# url="https://cdn-icons-png.flaticon.com/512/8649/8649595.png"
|
| 52 |
+
# ).send()
|
| 53 |
+
# await cl.Avatar(
|
| 54 |
+
# name="User",
|
| 55 |
+
# url="https://media.architecturaldigest.com/photos/5f241de2c850b2a36b415024/master/w_1600%2Cc_limit/Luke-logo.png"
|
| 56 |
+
# ).send()
|
| 57 |
+
|
| 58 |
_logger.info("\tsending message back: ready!!!")
|
| 59 |
|
| 60 |
content = ""
|
|
|
|
| 76 |
await cl.Message(
|
| 77 |
content=content + "\nHow can I help you with Meta's 2023 10K?"
|
| 78 |
).send()
|
| 79 |
+
_logger.info(f"{20 * '*'}")
|