avoid adding the same file multiple times

to the chatbot's files_to_promote list
This commit is contained in:
binary-husky
2023-12-19 19:43:03 +08:00
parent a0bfa7ba1c
commit f7588d4776
3 changed files with 3 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ def cut(limit, get_token_fn, txt_tocut, must_break_at_empty_line, break_anyway=F
remain_txt_to_cut = post
remain_txt_to_cut, remain_txt_to_cut_storage = maintain_storage(remain_txt_to_cut, remain_txt_to_cut_storage)
process = fin_len/total_len
print(f'\r正在文本切分 {int(process*100)}%', end='')
print(f'正在文本切分 {int(process*100)}%')
if len(remain_txt_to_cut.strip()) == 0:
break
return res