Skip to content

Commit 4c37b8c

Browse files
committed
fix tool call count
1 parent 000fdad commit 4c37b8c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

eval_protocol/pytest/default_single_turn_rollout_process.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ async def process_row(row: EvaluationRow) -> EvaluationRow:
103103
assert isinstance(response, ModelResponse), "Response should be ModelResponse"
104104
assert isinstance(response.choices[0], Choices), "Response choice should be a Choices"
105105

106+
print(f"DEBUG: Full Response: {response}")
106107
assistant_message = response.choices[0].message
108+
print(f"DEBUG: Assistant Message: {assistant_message}")
109+
print(f"DEBUG: Assistant Content: {assistant_message.content}")
107110
finish_reason = getattr(response.choices[0], "finish_reason", None)
108111

109112
# Extract content
@@ -177,6 +180,10 @@ async def process_row(row: EvaluationRow) -> EvaluationRow:
177180
total_tokens=total_tokens,
178181
)
179182

183+
row.execution_metadata.finish_reason = finish_reason
184+
if converted_tool_calls:
185+
row.execution_metadata.tool_call_count = len(converted_tool_calls)
186+
180187
row.execution_metadata.duration_seconds = time.perf_counter() - start_time
181188

182189
default_logger.log(row)

0 commit comments

Comments
 (0)