From bfbf6505885fce90af66d0c82a6fdb12604becc6 Mon Sep 17 00:00:00 2001 From: digger-yu Date: Thu, 4 May 2023 15:31:09 +0800 Subject: [PATCH 1/2] fix spelling error fix spelling error with evaluate.py --- applications/Chat/evaluate/evaluate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/Chat/evaluate/evaluate.py b/applications/Chat/evaluate/evaluate.py index 9f1770442..2f9c9ce8e 100644 --- a/applications/Chat/evaluate/evaluate.py +++ b/applications/Chat/evaluate/evaluate.py @@ -130,7 +130,7 @@ def evaluate(args): assert answer1_jsons[i]['id'] == answer2_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'] cat = answer1_jsons[i]['category'] ans1 = answer1_jsons[i]['output'] From 8ba7858753bab60bfc368e6ade561196598b48b7 Mon Sep 17 00:00:00 2001 From: digger-yu Date: Thu, 4 May 2023 15:34:16 +0800 Subject: [PATCH 2/2] Update generate_gpt35_answers.py fix spelling error with generate_gpt35_answers.py --- applications/Chat/evaluate/generate_gpt35_answers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/Chat/evaluate/generate_gpt35_answers.py b/applications/Chat/evaluate/generate_gpt35_answers.py index 852a7cb19..db95cd2fe 100644 --- a/applications/Chat/evaluate/generate_gpt35_answers.py +++ b/applications/Chat/evaluate/generate_gpt35_answers.py @@ -35,7 +35,7 @@ logger = logging.getLogger(__name__) def get_answer(question: str, max_tokens: int): answer = question - prompt = question['instruction'] if question['input'] == "" else question['instuction'] + \ + prompt = question['instruction'] if question['input'] == "" else question['instruction'] + \ " " + question['input'] for _ in range(MAX_API_RETRY): try: