feat(code): improve concat of strings in ui (#1785)
This commit is contained in:
parent
ea153fb92f
commit
bac818add5
|
@ -103,12 +103,12 @@ class PrivateGptUi:
|
||||||
sources_text = "\n\n\n"
|
sources_text = "\n\n\n"
|
||||||
used_files = set()
|
used_files = set()
|
||||||
for index, source in enumerate(cur_sources, start=1):
|
for index, source in enumerate(cur_sources, start=1):
|
||||||
if (source.file + "-" + source.page) not in used_files:
|
if f"{source.file}-{source.page}" not in used_files:
|
||||||
sources_text = (
|
sources_text = (
|
||||||
sources_text
|
sources_text
|
||||||
+ f"{index}. {source.file} (page {source.page}) \n\n"
|
+ f"{index}. {source.file} (page {source.page}) \n\n"
|
||||||
)
|
)
|
||||||
used_files.add(source.file + "-" + source.page)
|
used_files.add(f"{source.file}-{source.page}")
|
||||||
full_response += sources_text
|
full_response += sources_text
|
||||||
yield full_response
|
yield full_response
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue