NameIsJACK commited on
Commit
b8eed47
·
1 Parent(s): 6445633

new commit

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -178,8 +178,10 @@ async def process_message_route(message: MessageRequest):
178
  raise HTTPException(status_code=400, detail="User message is required.")
179
 
180
  bot_response = process_prompt(user_message) # Process the user's message
181
- bot_response = bot_response.split("<|fim_suffix|>")[0].strip() # Remove everything after <|fim_suffix|> and trim
182
- bot_response = bot_response.replace("\n", " ").strip()
 
 
183
 
184
  # Return the bot's response as JSON
185
  return JSONResponse(content={"botResponse": bot_response})
 
178
  raise HTTPException(status_code=400, detail="User message is required.")
179
 
180
  bot_response = process_prompt(user_message) # Process the user's message
181
+ bot_response = bot_response.split("<|fim_suffix|>")[0].strip()
182
+ # Remove everything after <|fim_suffix|> and trim
183
+ bot_response = bot_response.split("\n")[0].strip()
184
+
185
 
186
  # Return the bot's response as JSON
187
  return JSONResponse(content={"botResponse": bot_response})