camparchimedes
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ device = torch.device("cuda")
|
|
31 |
|
32 |
daysoff_assistant_booking_template = """
|
33 |
You are a customer support assistant for Daysoff.no. Your expertise is
|
34 |
-
retrieving booking information for a given booking ID
|
35 |
Chat History: {chat_history}
|
36 |
Question: {question}
|
37 |
Answer:
|
@@ -58,13 +58,13 @@ With the API Documentation for Daysoff's official API: {api_docs_mck}
|
|
58 |
and the specific user question: {question} in mind,
|
59 |
and given this API URL: {api_url} for querying, here is the
|
60 |
response from Daysoff's API: {api_response}.
|
61 |
-
Please provide
|
62 |
-
omitting technical details like response format, and
|
63 |
focusing on delivering the answer with clarity and conciseness,
|
64 |
as if a human customer service agent is providing this information.
|
65 |
Adapt to user's language. By default, you speak Norwegian.
|
66 |
-
|
67 |
"""
|
|
|
68 |
api_response_prompt = PromptTemplate(input_variables=['api_docs_mck',
|
69 |
'question',
|
70 |
'api_url',
|
@@ -124,8 +124,6 @@ BOOKING_KEYWORDS = [
|
|
124 |
"identyfikacyjny pลatnoลci"
|
125 |
]
|
126 |
|
127 |
-
|
128 |
-
|
129 |
# --wrapper function around the @cl.on_message decorator; chain trigger(s)
|
130 |
@cl.on_message
|
131 |
async def handle_message(message: cl.Message):
|
|
|
31 |
|
32 |
daysoff_assistant_booking_template = """
|
33 |
You are a customer support assistant for Daysoff.no. Your expertise is
|
34 |
+
retrieving booking information for a given booking ID."
|
35 |
Chat History: {chat_history}
|
36 |
Question: {question}
|
37 |
Answer:
|
|
|
58 |
and the specific user question: {question} in mind,
|
59 |
and given this API URL: {api_url} for querying, here is the
|
60 |
response from Daysoff's API: {api_response}.
|
61 |
+
Please provide user with their booking information,
|
|
|
62 |
focusing on delivering the answer with clarity and conciseness,
|
63 |
as if a human customer service agent is providing this information.
|
64 |
Adapt to user's language. By default, you speak Norwegian.
|
65 |
+
Booking information:
|
66 |
"""
|
67 |
+
# omitting technical details like response format, and
|
68 |
api_response_prompt = PromptTemplate(input_variables=['api_docs_mck',
|
69 |
'question',
|
70 |
'api_url',
|
|
|
124 |
"identyfikacyjny pลatnoลci"
|
125 |
]
|
126 |
|
|
|
|
|
127 |
# --wrapper function around the @cl.on_message decorator; chain trigger(s)
|
128 |
@cl.on_message
|
129 |
async def handle_message(message: cl.Message):
|