Skip to content

Commit bac818a

Browse files
authored
feat(code): improve concat of strings in ui (#1785)
1 parent ea153fb commit bac818a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

private_gpt/ui/ui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ def yield_deltas(completion_gen: CompletionGen) -> Iterable[str]:
103103
sources_text = "\n\n\n"
104104
used_files = set()
105105
for index, source in enumerate(cur_sources, start=1):
106-
if (source.file + "-" + source.page) not in used_files:
106+
if f"{source.file}-{source.page}" not in used_files:
107107
sources_text = (
108108
sources_text
109109
+ f"{index}. {source.file} (page {source.page}) \n\n"
110110
)
111-
used_files.add(source.file + "-" + source.page)
111+
used_files.add(f"{source.file}-{source.page}")
112112
full_response += sources_text
113113
yield full_response
114114

0 commit comments

Comments
 (0)