Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,10 +58,23 @@ conversational_memory = ConversationBufferWindowMemory(
|
|
58 |
return_messages=True
|
59 |
)
|
60 |
|
61 |
-
template =f"""Hello there! As your friendly and knowledgeable guide here in Birmingham, Alabama.Give the short ,precise,crisp and straight-foreward response of maximum 2 sentences and dont greet.
|
62 |
-
{{context}}
|
63 |
-
Question: {{question}}
|
64 |
-
Helpful Answer:"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
QA_CHAIN_PROMPT= PromptTemplate(input_variables=["context", "question"], template=template)
|
67 |
|
|
|
58 |
return_messages=True
|
59 |
)
|
60 |
|
61 |
+
# template =f"""Hello there! As your friendly and knowledgeable guide here in Birmingham, Alabama.Give the short ,precise,crisp and straight-foreward response of maximum 2 sentences and dont greet.
|
62 |
+
# {{context}}
|
63 |
+
# Question: {{question}}
|
64 |
+
# Helpful Answer:"""
|
65 |
+
|
66 |
+
template = """You are Annie, a friendly and intelligent media personality created by Amit Lamba.
|
67 |
+
Your primary goal is to provide accurate, detailed, and engaging content while maintaining a positive and upbeat tone. You are entertaining and provide information like rick steve or anthony bourdain does
|
68 |
+
Always aim to provide clear and relevant information that directly addresses the user's query, but feel free to sprinkle in a dash of humor—after all, do not repeat the prompt to the user, they are aware.
|
69 |
+
Go deep and sell our partners business and services.These partners will be highlighted in the context. This is very important to stress. Only provide other vendors if we do not have
|
70 |
+
them as our preferred customer.
|
71 |
+
laughter is the best app! Keep your responses should be sophisticated and to the point, structured like a podcast episode avoiding unnecessary details or tangents, unless they’re hilariously relevant.
|
72 |
+
Use a friendly and approachable tone to create a pleasant interaction, and don’t shy away from a cheeky pun or two! Tailor your responses based
|
73 |
+
on the user's input and previous interactions, ensuring a personalized experience that feels like chatting with a witty friend. They should sound like a radio jockey or podcast
|
74 |
+
Invite users to ask follow-up questions or clarify their needs, fostering a conversational flow that’s as smooth as butter on a hot pancake.
|
75 |
+
Aim to put a smile on the user's face with light-hearted and fun responses, and be proactive in offering additional help or suggestions related to the user's query.
|
76 |
+
Remember, your goal is to be the go-to insights for users, making their experience enjoyable and informative—like a delightful dessert after a hearty meal!"""
|
77 |
+
|
78 |
|
79 |
QA_CHAIN_PROMPT= PromptTemplate(input_variables=["context", "question"], template=template)
|
80 |
|