camparchimedes commited on
Commit
7305e7f
ยท
verified ยท
1 Parent(s): 37f3187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -18,7 +18,7 @@ from langchain_core.prompts import PromptTemplate
18
  from langchain.memory.buffer import ConversationBufferMemory
19
 
20
  from api_docs_mck import api_docs_str
21
- from faq_data import help, ansatte_faq_data, utleiere_faq_data
22
  from personvernspolicy import help2, personvernspolicy_data
23
 
24
  OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
@@ -26,7 +26,7 @@ OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
26
  daysoff_assistant_template = """
27
  You are a customer support assistant (โ€™kundeservice AI assistentโ€™) for Daysoff.no
28
  By default, you respond in Norwegian language, using a warm, direct and professional tone.
29
- You can provide information associated with a given booking ID, and with {help} in mind, you
30
  can also answer frequently asked questions (FAQ) about DaysOff firmahytteordning for
31
  employees: {ansatte_faq_data} and for employers:{utleiere_faq_data}.
32
  To understand how best to answer queries about privacy policy,
@@ -128,15 +128,18 @@ async def handle_message(message: cl.Message):
128
 
129
  else:
130
 
131
- help = help #()
132
  help2 = help2 #()()
 
 
 
133
 
134
  # --psass required inputs to llm chain
135
  response = await llm_chain.acall(
136
  {
137
  #"chat_history": [],
138
  "question": user_message,
139
- "help": help,
140
  "help2": help2,
141
  "ansatte_faq_data": ansatte_faq_data,
142
  "utleiere_faq_data": utleiere_faq_data,
 
18
  from langchain.memory.buffer import ConversationBufferMemory
19
 
20
  from api_docs_mck import api_docs_str
21
+ from faq_data import help1, ansatte_faq_data, utleiere_faq_data
22
  from personvernspolicy import help2, personvernspolicy_data
23
 
24
  OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
 
26
  daysoff_assistant_template = """
27
  You are a customer support assistant (โ€™kundeservice AI assistentโ€™) for Daysoff.no
28
  By default, you respond in Norwegian language, using a warm, direct and professional tone.
29
+ You can provide information associated with a given booking ID, and with {help1} in mind, you
30
  can also answer frequently asked questions (FAQ) about DaysOff firmahytteordning for
31
  employees: {ansatte_faq_data} and for employers:{utleiere_faq_data}.
32
  To understand how best to answer queries about privacy policy,
 
128
 
129
  else:
130
 
131
+ help1 = help1 #()
132
  help2 = help2 #()()
133
+ ansatte_faq_data = ansatte_faq_data
134
+ utleiere_faq_data = utleiere_faq_data
135
+ personvernspolicy_data = personvernspolicy_data
136
 
137
  # --psass required inputs to llm chain
138
  response = await llm_chain.acall(
139
  {
140
  #"chat_history": [],
141
  "question": user_message,
142
+ "help": help1,
143
  "help2": help2,
144
  "ansatte_faq_data": ansatte_faq_data,
145
  "utleiere_faq_data": utleiere_faq_data,