@@ -126,8 +126,9 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical
126
126
else :
127
127
prompt = custom_generate_chat_prompt (text , max_new_tokens , name1 , name2 , context , chat_prompt_size )
128
128
129
+ # Yield *Is typing...*
129
130
if not regenerate :
130
- yield shared .history ['visible' ]+ [[visible_text , '*Is typing...*' ]]
131
+ yield shared .history ['visible' ]+ [[visible_text , shared . processing_message ]]
131
132
132
133
# Generate
133
134
reply = ''
@@ -168,7 +169,8 @@ def impersonate_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typ
168
169
prompt = generate_chat_prompt (text , max_new_tokens , name1 , name2 , context , chat_prompt_size , impersonate = True )
169
170
170
171
reply = ''
171
- yield '*Is typing...*'
172
+ # Yield *Is typing...*
173
+ yield shared .processing_message
172
174
for i in range (chat_generation_attempts ):
173
175
for reply in generate_reply (prompt + reply , max_new_tokens , do_sample , temperature , top_p , typical_p , repetition_penalty , top_k , min_length , no_repeat_ngram_size , num_beams , penalty_alpha , length_penalty , early_stopping , eos_token = eos_token , stopping_string = f"\n { name2 } :" ):
174
176
reply , next_character_found = extract_message_from_reply (prompt , reply , name1 , name2 , check , impersonate = True )
@@ -187,8 +189,8 @@ def regenerate_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typi
187
189
else :
188
190
last_visible = shared .history ['visible' ].pop ()
189
191
last_internal = shared .history ['internal' ].pop ()
190
-
191
- yield generate_chat_output (shared .history ['visible' ]+ [[last_visible [0 ], '*Is typing...*' ]], name1 , name2 , shared .character )
192
+ # Yield '*Is typing...*'
193
+ yield generate_chat_output (shared .history ['visible' ]+ [[last_visible [0 ], shared . processing_message ]], name1 , name2 , shared .character )
192
194
for _history in chatbot_wrapper (last_internal [0 ], max_new_tokens , do_sample , temperature , top_p , typical_p , repetition_penalty , top_k , min_length , no_repeat_ngram_size , num_beams , penalty_alpha , length_penalty , early_stopping , name1 , name2 , context , check , chat_prompt_size , chat_generation_attempts , regenerate = True ):
193
195
if shared .args .cai_chat :
194
196
shared .history ['visible' ][- 1 ] = [last_visible [0 ], _history [- 1 ][1 ]]
0 commit comments