dj86 commited on
Commit
e9b0b75
1 Parent(s): 5607890

Update vlog4debate.py

Browse files
Files changed (1) hide show
  1. vlog4debate.py +13 -17
vlog4debate.py CHANGED
@@ -174,23 +174,19 @@ class Debate:
174
 
175
  def run(self):
176
  for round in range(self.max_round - 1):
177
-
178
- if self.mod_ans["debate_answer"] != '':
179
- break
180
- else:
181
- print(f"===== Debate Round-{round+1} =====\n")
182
- self.affirmative.add_event(self.config['debate_prompt'].replace('##oppo_ans##', self.neg_ans))
183
- self.aff_ans = self.affirmative.ask()
184
- self.affirmative.add_memory(self.aff_ans)
185
-
186
- self.negative.add_event(self.config['debate_prompt'].replace('##oppo_ans##', self.aff_ans))
187
- self.neg_ans = self.negative.ask()
188
- self.negative.add_memory(self.neg_ans)
189
-
190
- self.moderator.add_event(self.config['moderator_prompt'].replace('##aff_ans##', self.aff_ans).replace('##neg_ans##', self.neg_ans).replace('##round##', self.round_dct(round+2)))
191
- self.mod_ans = self.moderator.ask()
192
- self.moderator.add_memory(self.mod_ans)
193
- self.mod_ans = eval(self.mod_ans)
194
 
195
  if self.mod_ans["debate_answer"] != '':
196
  self.config.update(self.mod_ans)
 
174
 
175
  def run(self):
176
  for round in range(self.max_round - 1):
177
+ print(f"===== Debate Round-{round+1} =====\n")
178
+ self.affirmative.add_event(self.config['debate_prompt'].replace('##oppo_ans##', self.neg_ans))
179
+ self.aff_ans = self.affirmative.ask()
180
+ self.affirmative.add_memory(self.aff_ans)
181
+
182
+ self.negative.add_event(self.config['debate_prompt'].replace('##oppo_ans##', self.aff_ans))
183
+ self.neg_ans = self.negative.ask()
184
+ self.negative.add_memory(self.neg_ans)
185
+
186
+ self.moderator.add_event(self.config['moderator_prompt'].replace('##aff_ans##', self.aff_ans).replace('##neg_ans##', self.neg_ans).replace('##round##', self.round_dct(round+2)))
187
+ self.mod_ans = self.moderator.ask()
188
+ self.moderator.add_memory(self.mod_ans)
189
+ self.mod_ans = eval(self.mod_ans)
 
 
 
 
190
 
191
  if self.mod_ans["debate_answer"] != '':
192
  self.config.update(self.mod_ans)