Fix turn_idx in eval

pull/573/head
duzx16 2023-04-12 23:41:37 +08:00
parent f06df225dd
commit 7607cfe585
1 changed files with 2 additions and 2 deletions

View File

@ -166,8 +166,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)
inputs.append(prompt)
targets.append(examples[response_column][i])