Fix turn_idx

pull/561/head
duzx16 2023-04-12 23:34:44 +08:00
parent 5b0332e59e
commit f06df225dd
1 changed files with 2 additions and 2 deletions

View File

@ -200,8 +200,8 @@ def main():
else:
prompt = ""
history = examples[history_column][i]
for i, (old_query, response) in enumerate(history):
prompt += "[Round {}]\n问:{}\n答:{}\n".format(i, old_query, response)
for turn_idx, (old_query, response) in enumerate(history):
prompt += "[Round {}]\n问:{}\n答:{}\n".format(turn_idx, old_query, response)
prompt += "[Round {}]\n问:{}\n答:".format(len(history), query)
prompt = prefix + prompt