Spaces:
Runtime error
Runtime error
Commit
·
72c09a1
1
Parent(s):
3e8a76c
Update app.py
Browse files
app.py
CHANGED
@@ -59,18 +59,6 @@ class ChatWrapper:
|
|
59 |
|
60 |
output = chain_obj["answer"]
|
61 |
|
62 |
-
sources = chain_obj['source_documents']
|
63 |
-
|
64 |
-
source_link = []
|
65 |
-
sources_str = 'Sources:'
|
66 |
-
for source in sources:
|
67 |
-
if source.metadata['source'] not in source_link:
|
68 |
-
source_link.append(source.metadata['source'])
|
69 |
-
sources_str += '\n' + source.metadata['source']
|
70 |
-
|
71 |
-
if 'Unfortunately, our current pool of insights does not have an answer to this.' not in output:
|
72 |
-
output += '\n\n' + sources_str
|
73 |
-
|
74 |
history.append((inp, output))
|
75 |
print(history)
|
76 |
# print(chain_obj)
|
|
|
59 |
|
60 |
output = chain_obj["answer"]
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
history.append((inp, output))
|
63 |
print(history)
|
64 |
# print(chain_obj)
|