Skip to content

Commit

Permalink
update the mechanism for wrong responses
Browse files Browse the repository at this point in the history
  • Loading branch information
DonaldLamNL committed Sep 5, 2024
1 parent b3c6a96 commit 102c1c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ def start_request(self, scale_details, level_description, statement_description,
gpt_responses = llm_request(self.model, inputs)
parsed_responses = json.loads(gpt_responses)
parsed_responses = [convert_symbol(label, value) for value in parsed_responses.values()]
if order == 'r':
parsed_responses = [scale_max-score+1 for score in parsed_responses]

if None in parsed_responses: return None
if order == 'r': parsed_responses = [scale_max-score+1 for score in parsed_responses]

except:
return None
Expand Down

0 comments on commit 102c1c1

Please sign in to comment.