Update app.py
Browse files
app.py
CHANGED
@@ -134,9 +134,9 @@ def respond(message, history):
|
|
134 |
json_data = json.loads(str(response))
|
135 |
if json_data["name"] == "web_search":
|
136 |
query = json_data["arguments"]["query"]
|
137 |
-
|
138 |
web_results = search(query)
|
139 |
-
|
140 |
web2 = ' '.join([f"Link: {res['link']}\nText: {res['text']}\n\n" for res in web_results])
|
141 |
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|>"
|
142 |
for msg in history:
|
|
|
134 |
json_data = json.loads(str(response))
|
135 |
if json_data["name"] == "web_search":
|
136 |
query = json_data["arguments"]["query"]
|
137 |
+
# gr.Info("Searching Web")
|
138 |
web_results = search(query)
|
139 |
+
# gr.Info("Extracting relevant Info")
|
140 |
web2 = ' '.join([f"Link: {res['link']}\nText: {res['text']}\n\n" for res in web_results])
|
141 |
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|>"
|
142 |
for msg in history:
|