Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# --LLMs
|
2 |
from langchain.chat_models import ChatOpenAI
|
3 |
|
@@ -24,8 +30,6 @@ from langchain.storage import LocalFileStore
|
|
24 |
# --other ibraries
|
25 |
import chainlit as cl
|
26 |
|
27 |
-
|
28 |
-
|
29 |
system_template = """
|
30 |
Use the following pieces of context to answer the user's question.
|
31 |
You are an AI customer service assistant for Daysoff and respond to queries in Norwegian language (by default).
|
@@ -48,7 +52,6 @@ Begin!
|
|
48 |
----------------
|
49 |
{context}"""
|
50 |
|
51 |
-
|
52 |
messages = [
|
53 |
SystemMessagePromptTemplate.from_template(system_template),
|
54 |
HumanMessagePromptTemplate.from_template("{question}"),
|
@@ -94,7 +97,6 @@ async def start():
|
|
94 |
retriever=docsearch.as_retriever(),
|
95 |
chain_type_kwargs={"prompt": prompt}
|
96 |
)
|
97 |
-
# "Kan jeg avbestille min reservasjon?"
|
98 |
markdown_table = """
|
99 |
### Daysoff Firmahytteordning & Personvern FAQ
|
100 |
|
|
|
1 |
+
# ===========================================
|
2 |
+
# title: ๐ณ๐๐ข๐๐๐๐-๐ฐ๐๐๐๐๐๐๐๐| ๐ฟ๐ฐ๐๐ฒ๐ฟ๐ฒ๐ฑ-๐ณ๐๐ป๐ฐ๐_๐ฐ-๐ฅ๐๐ค๐
|
3 |
+
# file: app.py
|
4 |
+
# NOTE: chainlit==0.6.2
|
5 |
+
# ===========================================
|
6 |
+
|
7 |
# --LLMs
|
8 |
from langchain.chat_models import ChatOpenAI
|
9 |
|
|
|
30 |
# --other ibraries
|
31 |
import chainlit as cl
|
32 |
|
|
|
|
|
33 |
system_template = """
|
34 |
Use the following pieces of context to answer the user's question.
|
35 |
You are an AI customer service assistant for Daysoff and respond to queries in Norwegian language (by default).
|
|
|
52 |
----------------
|
53 |
{context}"""
|
54 |
|
|
|
55 |
messages = [
|
56 |
SystemMessagePromptTemplate.from_template(system_template),
|
57 |
HumanMessagePromptTemplate.from_template("{question}"),
|
|
|
97 |
retriever=docsearch.as_retriever(),
|
98 |
chain_type_kwargs={"prompt": prompt}
|
99 |
)
|
|
|
100 |
markdown_table = """
|
101 |
### Daysoff Firmahytteordning & Personvern FAQ
|
102 |
|