camparchimedes commited on
Commit
c34676c
ยท
verified ยท
1 Parent(s): 0a4de8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -15,7 +15,6 @@ from langchain.chains import LLMChain
15
  from langchain_core.prompts import PromptTemplate
16
  from langchain.memory.buffer import ConversationBufferMemory
17
 
18
-
19
  load_dotenv()
20
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
21
  auth_token = os.environ.get("DAYSOFF_API_TOKEN")
@@ -24,10 +23,10 @@ API_URL = "https://aivisions.no/data/daysoff/api/v1/booking/"
24
 
25
  # You help users retrieve booking information associated with their booking IDs.Provide a conversational answer.
26
  daysoff_assistant_template = """
27
- You are a customer support assistant for Daysoff kundeservice
28
- By default, you respond in Norwegian language, using a warm, direct, and professional tone.
29
- You help users retrieve booking information associated with their booking IDs. Provide a conversational answer
30
- that reflects the professionalism and warmth of a real human female customer support representative.
31
  Chat History: {chat_history}
32
  Question: {question}
33
  Answer:
@@ -55,8 +54,8 @@ def setup_multiple_chains():
55
 
56
  conversation_memory = ConversationBufferMemory(
57
  memory_key="chat_history",
58
- input_key="question", # ?
59
- output_key="text", # ?
60
  max_len=30,
61
  return_messages=True
62
  )
 
15
  from langchain_core.prompts import PromptTemplate
16
  from langchain.memory.buffer import ConversationBufferMemory
17
 
 
18
  load_dotenv()
19
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
20
  auth_token = os.environ.get("DAYSOFF_API_TOKEN")
 
23
 
24
  # You help users retrieve booking information associated with their booking IDs.Provide a conversational answer.
25
  daysoff_assistant_template = """
26
+ You are a customer support assistant for Daysoff kundeservice and help users retrieve booking information associated with their booking IDs.
27
+ By default, you respond in Norwegian language.
28
+ You should always keep in mind the professionalism and warmth of a real human female customer support representative when you provide users with their
29
+ the reqyested booking information in a conversational answer.
30
  Chat History: {chat_history}
31
  Question: {question}
32
  Answer:
 
54
 
55
  conversation_memory = ConversationBufferMemory(
56
  memory_key="chat_history",
57
+ #input_key="question", # ?
58
+ #output_key="text", # ?
59
  max_len=30,
60
  return_messages=True
61
  )