```javascript
// imports calculate function from step 1
async function runConversation(userPrompt) {
    const messages = [
        {
            role: "system",
            content: "You are a calculator assistant. Use the calculate function to perform mathematical operations and provide the results."
        },
        {
            role: "user",
            content: userPrompt,
        }
    ];
  
    const tools = [
        {
            type: "function",
            function: {
                name: "calculate",
                description: "Evaluate a mathematical expression",
                parameters: {
                    type: "object",
                    properties: {
                        expression: {
                            type: "string",
                            description: "The mathematical expression to evaluate",
                        }
                    },
                    required: ["expression"],
                },
            },
        }
    ];
  
    const response = await client.chat.completions.create({
        model: MODEL,
        messages: messages,
        stream: false,
        tools: tools,
        tool_choice: "auto",
        max_completion_tokens: 4096
    });
  
    const responseMessage = response.choices[0].message;
    const toolCalls = responseMessage.tool_calls;
  
    if (toolCalls) {
        const availableFunctions = {
            "calculate": calculate,
        };
  
        messages.push(responseMessage);
  
        for (const toolCall of toolCalls) {
            const functionName = toolCall.function.name;
            const functionToCall = availableFunctions[functionName];
            const functionArgs = JSON.parse(toolCall.function.arguments);
            const functionResponse = functionToCall(functionArgs.expression);
  
            messages.push({
                tool_calls_id: toolCall.id,
                role: "tool",
                content: functionResponse,
            });
        }
  
        const secondResponse = await client.chat.completions.create({
            model: MODEL,
            messages: messages
        });
  
        return secondResponse.choices[0].message.content;
    }
  
    return responseMessage.content;
}
  
const userPrompt = "What is 25 * 4 + 10?";
runConversation(userPrompt).then(console.log).catch(console.error);
```

---

## Initialize the Groq client