Skip to content

Commit

Permalink
evaluate script
Browse files Browse the repository at this point in the history
  • Loading branch information
kl2806 committed Dec 27, 2024
1 parent 556ef5c commit b624ace
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions evaluate_gsm8k.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def evaluate(input_file: str):

final_answer = ""
for message in obj['response']['messages']:
if message['message_type'] == "function_call":
if message['function_call']['name'] == "send_message":
arguments = json.loads(message['function_call']['arguments'])
if message['message_type'] == "tool_call_message":
if message['tool_call']['name'] == "send_message":
arguments = json.loads(message['tool_call']['arguments'])
final_answer = arguments['message']

# TODO: make sure this matches lm-evaluation-harness
Expand Down

0 comments on commit b624ace

Please sign in to comment.