Lab 5 code bug

in process_messages(messages) util function in Lab5 there is the code

if message[‘tool_call_id’] in message.values():
tool_response[“tool_response”] = message[‘content’]

But message[‘tool_call_id’] in message.values() should be always true and so all tool_responses are populated with the message content, probably the code was intended as

if tool_response[‘tool_call_id’] in message.values():
tool_response[“tool_response”] = message[‘content’]

regards,

1 Like

Hello! Thank you for reporting! Are you referring to this Lab 5: Adding Structure to your Evaluations

and this utils file?

If so, I just ran the whole lab and it is working. Although, you have a valid observation. Please, let me know if this is the lab you are referring to, to check it again.

Thanks!

-- Lesly, DLAI