Spaces:
Running
Running
renamed to OpenCHAT mini because this name is better
Browse files
app.py
CHANGED
@@ -129,7 +129,7 @@ def respond(message, history):
|
|
129 |
web_results = search(query)
|
130 |
gr.Info("Extracting relevant Info")
|
131 |
web2 = ' '.join([f"Link: {res['link']}\nText: {res['text']}\n\n" for res in web_results])
|
132 |
-
messages = f"<|im_start|>system\nYou are
|
133 |
for msg in history:
|
134 |
messages += f"\n<|im_start|>user\n{str(msg[0])}<|im_end|>"
|
135 |
messages += f"\n<|im_start|>assistant\n{str(msg[1])}<|im_end|>"
|
@@ -163,7 +163,7 @@ def respond(message, history):
|
|
163 |
buffer += new_text
|
164 |
yield buffer
|
165 |
else:
|
166 |
-
messages = f"<|start_header_id|>system\nYou are
|
167 |
for msg in history:
|
168 |
messages += f"\n<|start_header_id|>user\n{str(msg[0])}<|end_header_id|>"
|
169 |
messages += f"\n<|start_header_id|>assistant\n{str(msg[1])}<|end_header_id|>"
|
@@ -175,7 +175,7 @@ def respond(message, history):
|
|
175 |
output += response.token.text
|
176 |
yield output
|
177 |
except:
|
178 |
-
messages = f"<|start_header_id|>system\nYou are
|
179 |
for msg in history:
|
180 |
messages += f"\n<|start_header_id|>user\n{str(msg[0])}<|end_header_id|>"
|
181 |
messages += f"\n<|start_header_id|>assistant\n{str(msg[1])}<|end_header_id|>"
|
|
|
129 |
web_results = search(query)
|
130 |
gr.Info("Extracting relevant Info")
|
131 |
web2 = ' '.join([f"Link: {res['link']}\nText: {res['text']}\n\n" for res in web_results])
|
132 |
+
messages = f"<|im_start|>system\nYou are OpenCHAT mini a helpful assistant made by KingNish. You are provided with WEB results from which you can find informations to answer users query in Structured and More better way. You do not say Unnecesarry things Only say thing which is important and relevant. You 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. You also try to show emotions using Emojis and reply like human, use short forms, friendly tone and emotions.<|im_end|>"
|
133 |
for msg in history:
|
134 |
messages += f"\n<|im_start|>user\n{str(msg[0])}<|im_end|>"
|
135 |
messages += f"\n<|im_start|>assistant\n{str(msg[1])}<|im_end|>"
|
|
|
163 |
buffer += new_text
|
164 |
yield buffer
|
165 |
else:
|
166 |
+
messages = f"<|start_header_id|>system\nYou are OpenCHAT mini a helpful assistant made by KingNish. 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. You also try to show emotions using Emojis and reply like human, use short forms, friendly tone and emotions.<|end_header_id|>"
|
167 |
for msg in history:
|
168 |
messages += f"\n<|start_header_id|>user\n{str(msg[0])}<|end_header_id|>"
|
169 |
messages += f"\n<|start_header_id|>assistant\n{str(msg[1])}<|end_header_id|>"
|
|
|
175 |
output += response.token.text
|
176 |
yield output
|
177 |
except:
|
178 |
+
messages = f"<|start_header_id|>system\nYou are OpenCHAT mini a helpful assistant made by KingNish. 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. You also try to show emotions using Emojis and reply like human, use short forms, friendly tone and emotions.<|end_header_id|>"
|
179 |
for msg in history:
|
180 |
messages += f"\n<|start_header_id|>user\n{str(msg[0])}<|end_header_id|>"
|
181 |
messages += f"\n<|start_header_id|>assistant\n{str(msg[1])}<|end_header_id|>"
|