Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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
|
| 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 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 |
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|>"
|