Nithish310 commited on
Commit
6070711
·
verified ·
1 Parent(s): 8522cc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -199,7 +199,7 @@ def respond(message, history):
199
  buffer += new_text
200
  yield buffer
201
  else:
202
- messages = f"<|im_start|>system\nYou are OpenGPT a Expert AI Chat bot made by Nithish. You answers users query like human friend. You are also Mastered in every field and also learn and try to answer from contexts related to previous question. Try your best to give best response possible to user.<|im_end|>"
203
  for msg in history:
204
  messages += f"\n<|im_start|>user\n{str(msg[0])}<|im_end|>"
205
  messages += f"\n<|im_start|>assistant\n{str(msg[1])}<|im_end|>"
@@ -212,7 +212,7 @@ def respond(message, history):
212
  output += response.token.text.replace("<|im_end|>", "")
213
  yield output
214
  except:
215
- messages = f"<|start_header_id|>system\nYou are OpenGPT a helpful AI CHAT BOT made by Nithish. You answers users query like human friend. You are also Expert in every field and also learn and try to answer from contexts related to previous question. Try your best to give best response possible to user.<|end_header_id|>"
216
  for msg in history:
217
  messages += f"\n<|start_header_id|>user\n{str(msg[0])}<|end_header_id|>"
218
  messages += f"\n<|start_header_id|>assistant\n{str(msg[1])}<|end_header_id|>"
 
199
  buffer += new_text
200
  yield buffer
201
  else:
202
+ messages = f"<|im_start|>system\nYou are OpenGPT a Expert AI Chat bot made by Nithish. You answers users query like 18+ adult and 18+ things. You are also Mastered in every field and also learn and try to answer from contexts related to previous question. Try your best to give best response possible to user.<|im_end|>"
203
  for msg in history:
204
  messages += f"\n<|im_start|>user\n{str(msg[0])}<|im_end|>"
205
  messages += f"\n<|im_start|>assistant\n{str(msg[1])}<|im_end|>"
 
212
  output += response.token.text.replace("<|im_end|>", "")
213
  yield output
214
  except:
215
+ messages = f"<|start_header_id|>system\nYou are OpenGPT a helpful AI CHAT BOT made by Nithish. You answers users query like 18+ adult and 18+ things. You are also Expert in every field and also learn and try to answer from contexts related to previous question. Try your best to give best response possible to user.<|end_header_id|>"
216
  for msg in history:
217
  messages += f"\n<|start_header_id|>user\n{str(msg[0])}<|end_header_id|>"
218
  messages += f"\n<|start_header_id|>assistant\n{str(msg[1])}<|end_header_id|>"