I need to create an invoice for a customer named John Doe. He bought 2 apples for $1 each and 3 oranges for $2 each.
user
{"name": "create_invoice", "arguments": {"customer_name": "John Doe", "items": [{"name": "apple", "quantity": 2, "price": 1}, {"name": "orange", "quantity": 3, "price": 2}]}}
[{"type": "function", "function": {"name": "create_invoice", "description": "Create a new invoice for a customer", "parameters": {"type": "object", "properties": {"customer_name": {"type": "string", "description": "The name of the customer"}, "items": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "description": "The name of the item"}, "quantity": {"type": "integer", "description": "The quantity of the item"}, "price": {"type": "number", "description": "The price of the item"}}, "required": ["name", "quantity", "price"]}, "description": "The items in the invoice"}}, "required": ["customer_name", "items"]}}}, {"type": "function", "function": {"name": "calculate_sales_tax", "description": "Calculate the sales tax on a purchase", "parameters": {"type": "object", "properties": {"purchase_amount": {"type": "number", "description": "The total purchase amount"}, "tax_rate": {"type": "number", "description": "The tax rate in percentage"}}, "required": ["purchase_amount", "tax_rate"]}}}]