Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ qa_system_prompt = """You are an assistant for question-answering tasks.
|
|
81 |
Use the following pieces of retrieved context to answer the question.
|
82 |
If you don't know the answer, just say that you don't know.
|
83 |
Use three sentences minimum and include a lot of information that the user might need.
|
84 |
-
Make
|
85 |
|
86 |
{context}"""
|
87 |
qa_prompt = ChatPromptTemplate.from_messages(
|
@@ -134,7 +134,7 @@ async def echo(websocket):
|
|
134 |
response = response.replace("Assistant: ", "").replace("AI: ", "")
|
135 |
response.strip()
|
136 |
while response.startswith("\n"):
|
137 |
-
response = response[
|
138 |
await websocket.send(json.dumps({"response": response}))
|
139 |
|
140 |
async def main():
|
|
|
81 |
Use the following pieces of retrieved context to answer the question.
|
82 |
If you don't know the answer, just say that you don't know.
|
83 |
Use three sentences minimum and include a lot of information that the user might need.
|
84 |
+
Make it readable with lots of newlines in between sentences.
|
85 |
|
86 |
{context}"""
|
87 |
qa_prompt = ChatPromptTemplate.from_messages(
|
|
|
134 |
response = response.replace("Assistant: ", "").replace("AI: ", "")
|
135 |
response.strip()
|
136 |
while response.startswith("\n"):
|
137 |
+
response = response[1:]
|
138 |
await websocket.send(json.dumps({"response": response}))
|
139 |
|
140 |
async def main():
|