araeyn commited on
Commit
1b8329a
1 Parent(s): aa2d33d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 sure to use multiple lines and breaks in the response to increase readability.
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[2:]
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():