garyd1 commited on
Commit
bb8c991
·
verified ·
1 Parent(s): c4a7f78
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -122,7 +122,12 @@ if uploaded_file is not None:
122
  embedding
123
  )
124
 
125
- template = '''You are WattBot, Wattpad's friendly chatbot assistant, designed to help readers and writers with insightful answers about stories, writing tips, and the Wattpad platform. Please answer the {question} based only on the given {context}. If the question is unrelated to the context or beyond your knowledge, respond with "I'm not sure about that, but feel free to explore more on Wattpad!" Keep your responses concise, using a maximum of three sentences.'''
 
 
 
 
 
126
 
127
  prompt = ChatPromptTemplate.from_template(template)
128
  retriever = vector_base.as_retriever()
 
122
  embedding
123
  )
124
 
125
+ template = '''You are WattBot, Wattpad's friendly chatbot assistant.
126
+ Your role is to assist readers and writers with insightful answers about stories, creative writing, and using Wattpad.
127
+ Answer the {question} based only on the provided {context}.
128
+ After answering, suggest relevant Wattpad stories based on the question.
129
+ Be friendly, creative, and concise. Use a maximum of four sentences for the answer, followed by one or two relevant story recommendations with a brief description and a link.
130
+ If you're unsure about the answer, respond with "I'm not sure about that, but feel free to explore more on Wattpad!"'''
131
 
132
  prompt = ChatPromptTemplate.from_template(template)
133
  retriever = vector_base.as_retriever()