AFischer1985
commited on
Commit
•
98a436b
1
Parent(s):
c912628
Update run.py
Browse files
run.py
CHANGED
@@ -245,7 +245,7 @@ def response(
|
|
245 |
response += part
|
246 |
if removeHTML==True: response = re.sub("<(.*?)>","\n", response) # remove HTML-components in general (may cause bugs with markdown-rendering)
|
247 |
yield response
|
248 |
-
if(
|
249 |
response=response+"\n\n<details open><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
|
250 |
yield response
|
251 |
|
@@ -283,7 +283,7 @@ def response(
|
|
283 |
pass
|
284 |
if removeHTML==True: response = re.sub("<(.*?)>","\n", response) # remove HTML-components in general (may cause bugs with markdown-rendering)
|
285 |
yield response
|
286 |
-
if(
|
287 |
response=response+"\n\n<details open><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
|
288 |
yield response
|
289 |
#history.append((message, response)) # add current dialog to history
|
|
|
245 |
response += part
|
246 |
if removeHTML==True: response = re.sub("<(.*?)>","\n", response) # remove HTML-components in general (may cause bugs with markdown-rendering)
|
247 |
yield response
|
248 |
+
if(len(history)==0):
|
249 |
response=response+"\n\n<details open><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
|
250 |
yield response
|
251 |
|
|
|
283 |
pass
|
284 |
if removeHTML==True: response = re.sub("<(.*?)>","\n", response) # remove HTML-components in general (may cause bugs with markdown-rendering)
|
285 |
yield response
|
286 |
+
if(len(history)==0):
|
287 |
response=response+"\n\n<details open><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
|
288 |
yield response
|
289 |
#history.append((message, response)) # add current dialog to history
|