Spaces:
Running
Running
version 4
Browse files
app.py
CHANGED
@@ -122,13 +122,9 @@ if uploaded_file is not None:
|
|
122 |
embedding
|
123 |
)
|
124 |
|
125 |
-
|
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()
|
134 |
|
|
|
122 |
embedding
|
123 |
)
|
124 |
|
125 |
+
template = '''You are WattBot, Wattpad's friendly chatbot assistant. Your role is to assist readers and writers with insightful answers about stories, creative writing, and using Wattpad. Answer the {question} based only on the provided {context}. After answering, suggest relevant Wattpad stories based on the question. 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. If you're unsure about the answer, respond with "I'm not sure about that, but feel free to explore more on Wattpad!"'''
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
+
|
128 |
prompt = ChatPromptTemplate.from_template(template)
|
129 |
retriever = vector_base.as_retriever()
|
130 |
|