bots should no longer get stuck in a loop forever
This commit is contained in:
		
							parent
							
								
									8bc97a0203
								
							
						
					
					
						commit
						f39fbc9c67
					
				| 
						 | 
				
			
			@ -29,8 +29,9 @@ def make_sentence(output):
 | 
			
		|||
	os.remove("toots-copy.db")
 | 
			
		||||
 | 
			
		||||
	sentence = None
 | 
			
		||||
	while sentence is None or re.match("^@\u202B", sentence):
 | 
			
		||||
	while sentence is None:
 | 
			
		||||
		sentence = model.make_short_sentence(500, tries=10000)
 | 
			
		||||
	sentence = re.sub("^@\u202B[^ ]* ", "", sentence)
 | 
			
		||||
	output.send(sentence)
 | 
			
		||||
 | 
			
		||||
def make_toot(force_markov = False, args = None):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in New Issue