Code QuizIntermediate

Returning Tool Call Results

Spot the wrong message role used when returning a tool result.

Codejavascript
const toolCall = response.tool_calls[0];
const result = runTool(toolCall.name, JSON.parse(toolCall.arguments));

messages.push({
  role: "assistant",
  content: JSON.stringify(result)
});

// send messages back to the model...

What is the bug when returning the tool result?