Merge pull request #3680 from digger-yu/digger-yu-patch-2

fix spelling error with applications/Chat/evaluate/
pull/3688/head
Tong Li 2023-05-05 16:26:04 +08:00 committed by GitHub
commit b36e67cb2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ def evaluate(args):
assert answer1_jsons[i]['id'] == answer2_jsons[i]['id'] assert answer1_jsons[i]['id'] == answer2_jsons[i]['id']
answer_id = answer1_jsons[i]['id'] answer_id = answer1_jsons[i]['id']
ques = answer1_jsons[i]['instruction'] if answer1_jsons[i]['input'] == "" else answer1_jsons[i]['instuction'] + \ ques = answer1_jsons[i]['instruction'] if answer1_jsons[i]['input'] == "" else answer1_jsons[i]['instruction'] + \
" " + answer1_jsons[i]['input'] " " + answer1_jsons[i]['input']
cat = answer1_jsons[i]['category'] cat = answer1_jsons[i]['category']
ans1 = answer1_jsons[i]['output'] ans1 = answer1_jsons[i]['output']

View File

@ -35,7 +35,7 @@ logger = logging.getLogger(__name__)
def get_answer(question: str, max_tokens: int): def get_answer(question: str, max_tokens: int):
answer = question answer = question
prompt = question['instruction'] if question['input'] == "" else question['instuction'] + \ prompt = question['instruction'] if question['input'] == "" else question['instruction'] + \
" " + question['input'] " " + question['input']
for _ in range(MAX_API_RETRY): for _ in range(MAX_API_RETRY):
try: try: