dataset
stringclasses
1 value
conversations
listlengths
3
11
id
int64
1
77.6k
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\nเครื่องมือ (Tools): [\n {\n \"function\": {\n \"description\": \"Send an email to a recipient\",\n \"name\": \"send_email\",\n \"parameters\": {\n \"properties\": {\n \"recipient\": {\n \"description\": \"The email address of the recipient\",\n \"type\": \"string\"\n },\n \"subject\": {\n \"description\": \"The subject of the email\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"The body of the email message\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"recipient\",\n \"subject\",\n \"message\"\n ]\n }\n },\n \"type\": \"function\"\n }\n]\n\n<format>\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n</format>", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI need to send an email to my boss. Can you help me with that?\n[END OF QUERY]", "role": "human" }, { "content": "Of course, I can help you with that. Could you please provide me with the recipient's email address, the subject of the email, and the message you want to send?", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nSure, the recipient's email is boss@company.com. The subject is \"Project Update\" and the message is \"Dear Boss, I have completed the project as per the given deadline. I have attached the final report for your review. Regards, [User's Name]\".\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"send_email\",\n \"arguments\": {\n \"recipient\": \"boss@company.com\",\n \"subject\": \"Project Update\",\n \"message\": \"Dear Boss, I have completed the project as per the given deadline. I have attached the final report for your review. Regards, [User's Name]\"\n }\n }\n]}", "role": "gpt" } ]
1
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[TASK INSTRUCTION END]\n\nเครื่องมือ (Tools): [\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Calculate the monthly loan payment\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"principal_amount\": {\n \"description\": \"The principal amount of the loan\",\n \"type\": \"number\"\n },\n \"loan_term\": {\n \"description\": \"The loan term in months\",\n \"type\": \"integer\"\n },\n \"interest_rate\": {\n \"type\": \"number\",\n \"description\": \"The annual interest rate\"\n }\n },\n \"required\": [\n \"principal_amount\",\n \"interest_rate\",\n \"loan_term\"\n ]\n },\n \"name\": \"calculate_loan_payment\"\n }\n }\n]\n\n[FORMAT INSTRUCTION START]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "คำถาม (Question): Hi, I need some help with calculating my loan payment.", "role": "human" }, { "content": "Of course, I can help with that. Could you please provide me with the principal amount of the loan, the annual interest rate, and the loan term in months?", "role": "gpt" }, { "content": "Sure, the principal amount is $50000, the annual interest rate is 5%, and the loan term is 60 months.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_loan_payment\",\n \"arguments\": {\n \"principal_amount\": 50000,\n \"interest_rate\": 5,\n \"loan_term\": 60\n }\n }\n]}", "role": "gpt" } ]
2
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n\n<format>\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n</format>\n\n[\n {\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"description\": \"The email address of the recipient\",\n \"type\": \"string\"\n },\n \"subject\": {\n \"description\": \"The subject of the email\",\n \"type\": \"string\"\n },\n \"body\": {\n \"description\": \"The content of the email\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"to\",\n \"subject\",\n \"body\"\n ]\n },\n \"name\": \"send_email\",\n \"description\": \"Send an email\"\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "<query>\nI need to send an email to my boss. Can you help me with that?\n</query>", "role": "human" }, { "content": "Of course, I can help you with that. Could you please provide me with the email address of your boss, the subject of the email, and the content you want to include in the email?", "role": "gpt" }, { "content": "Sure, the email address is boss@company.com. The subject is \"Monthly Report\" and the content is \"Dear Boss, Please find attached the monthly report for your review. Best, [Your Name]\".", "role": "human" }, { "content": "[send_email(to='boss@company.com', subject='Monthly Report', body='Dear Boss, Please find attached the monthly report for your review. Best, [Your Name]')]", "role": "gpt" } ]
3
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[END OF TASK INSTRUCTION]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[END OF FORMAT INSTRUCTION]\n\n### Tools: [{\"type\": \"function\", \"function\": {\"name\": \"calculate_tip\", \"description\": \"Calculate the tip amount for a bill\", \"parameters\": {\"required\": [\"bill_amount\", \"tip_percentage\"], \"properties\": {\"bill_amount\": {\"description\": \"The total bill amount\", \"type\": \"number\"}, \"tip_percentage\": {\"type\": \"number\", \"description\": \"The percentage tip to give\"}}, \"type\": \"object\"}}}]", "role": "system" }, { "content": "### Instruction: Hi, I need help with calculating a tip. My bill is $50 and I want to leave a 20% tip.", "role": "human" }, { "content": "[calculate_tip(bill_amount=50, tip_percentage=20)]", "role": "gpt" } ]
4
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n[AVAILABLE TOOLS START]\n[\n {\n \"function\": {\n \"name\": \"create_account\",\n \"parameters\": {\n \"required\": [\n \"username\",\n \"password\",\n \"email\",\n \"age\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"password\": {\n \"description\": \"The password of the user\",\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"integer\",\n \"description\": \"The age of the user\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"The username of the user\"\n },\n \"email\": {\n \"type\": \"string\",\n \"description\": \"The email address of the user\"\n }\n }\n },\n \"description\": \"Create a user account\"\n },\n \"type\": \"function\"\n }\n]\n[AVAILABLE TOOLS END]\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.", "role": "system" }, { "content": "[BEGIN OF QUERY]\nCan you help me book a flight to New York?\n[END OF QUERY]", "role": "human" }, { "content": "I'm sorry, but I don't have the ability to book flights. My current function is to assist with creating user accounts. If you need help with that, feel free to ask.", "role": "gpt" } ]
5
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n[FORMAT INSTRUCTION START]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[FORMAT INSTRUCTION END]\n\n### Tools: [\n {\n \"function\": {\n \"parameters\": {\n \"required\": [\n \"product_id\",\n \"reviews\"\n ],\n \"properties\": {\n \"product_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the product\"\n },\n \"reviews\": {\n \"description\": \"The product reviews\",\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"type\": \"object\"\n },\n \"name\": \"analyze_product_reviews\",\n \"description\": \"Analyze the reviews of a product\"\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "Query: Can you please order a pizza for me?", "role": "human" }, { "content": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My current capabilities are limited to analyzing product reviews. If you need help with that, feel free to ask!", "role": "gpt" } ]
6
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n</Task>\n\n[BEGIN OF FORMAT INSTRUCTION]\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[END OF FORMAT INSTRUCTION]\n\nTools: [\n {\n \"function\": {\n \"name\": \"calculate_tip\",\n \"description\": \"Calculate the tip amount\",\n \"parameters\": {\n \"properties\": {\n \"bill_amount\": {\n \"type\": \"number\",\n \"description\": \"The total bill amount\"\n },\n \"tip_percentage\": {\n \"type\": \"number\",\n \"description\": \"The percentage tip to leave\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"bill_amount\",\n \"tip_percentage\"\n ]\n }\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, I need help with calculating a tip. My bill amount is $50 and I want to leave a 15% tip.\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_tip\",\n \"arguments\": {\n \"bill_amount\": 50,\n \"tip_percentage\": 15\n }\n }\n]}", "role": "gpt" }, { "content": "Great, thank you! What if I want to leave a 20% tip instead?", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_tip\",\n \"arguments\": {\n \"bill_amount\": 50,\n \"tip_percentage\": 20\n }\n }\n]}", "role": "gpt" }, { "content": "### Instruction: Perfect, thanks for the help!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
7
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"symbol\": {\n \"type\": \"string\",\n \"description\": \"The stock symbol\"\n }\n },\n \"required\": [\n \"symbol\"\n ]\n }\n }\n }\n]\n[END OF AVAILABLE TOOLS]\n\n<format>\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n</format>", "role": "system" }, { "content": "Query: Hi, can you tell me the current price of Apple stock?", "role": "human" }, { "content": "[get_stock_price(symbol='AAPL')]", "role": "gpt" }, { "content": "คำถาม (Question): What about Microsoft?", "role": "human" }, { "content": "[get_stock_price(symbol='MSFT')]", "role": "gpt" }, { "content": "Thank you for the information.", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
8
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n\n[AVAILABLE TOOLS START]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"generate_password\",\n \"description\": \"Generate a random password\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"length\": {\n \"type\": \"integer\",\n \"description\": \"The length of the password\"\n },\n \"include_symbols\": {\n \"type\": \"boolean\",\n \"description\": \"Include symbols in the password\"\n }\n },\n \"required\": [\n \"length\"\n ]\n }\n }\n }\n]\n[AVAILABLE TOOLS END]", "role": "system" }, { "content": "<query>\nI need a new password. Can you generate one for me?\n</query>", "role": "human" }, { "content": "Of course, I can help with that. How long would you like your password to be?", "role": "gpt" }, { "content": "### Instruction: Let's make it 12 characters long.", "role": "human" }, { "content": "Would you like to include symbols in your password?", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nYes, please include symbols.\n[END OF QUERY]", "role": "human" }, { "content": "[generate_password(length=12, include_symbols=True)]", "role": "gpt" } ]
9
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n[END OF TASK INSTRUCTION]\n\n<format>\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n</format>\n\n<tools>\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"add_contact\",\n \"description\": \"Add a new contact to the address book\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the contact\"\n },\n \"phone_number\": {\n \"type\": \"string\",\n \"description\": \"The phone number of the contact\"\n },\n \"email\": {\n \"type\": \"string\",\n \"description\": \"The email address of the contact\"\n }\n },\n \"required\": [\n \"name\"\n ]\n }\n }\n }\n]\n</tools>", "role": "system" }, { "content": "คำถาม (Question): Can you order a pizza for me?", "role": "human" }, { "content": "I'm sorry, but I'm unable to perform that task. My current capabilities are limited to adding contacts to the address book. I don't have a function to order food or perform other external tasks.", "role": "gpt" } ]
10
glaive-function-calling-v2-extended
[ { "content": "You are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\nเครื่องมือ (Tools): [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_random_quote\",\n \"description\": \"Get a random quote from a database\",\n \"parameters\": {}\n }\n }\n]\n\n<format>\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n</format>", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, can you help me with something?\n[END OF QUERY]", "role": "human" }, { "content": "Of course! I'm here to assist you. What do you need help with?", "role": "gpt" }, { "content": "Can you book a flight for me?", "role": "human" }, { "content": "I'm sorry, but I'm currently unable to assist with booking flights as I don't have a function for that specific task. However, I can provide you with a random quote if you'd like.", "role": "gpt" }, { "content": "Sure, I'd love to hear a quote.", "role": "human" }, { "content": "[\n {\n \"name\": \"get_random_quote\",\n \"arguments\": {}\n }\n]", "role": "gpt" }, { "content": "### Instruction: That's a great quote! Thanks for sharing.", "role": "human" }, { "content": "You're welcome! If you need anything else, feel free to ask.", "role": "gpt" } ]
11
glaive-function-calling-v2-extended
[ { "content": "You are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n\n<tools>\n[\n {\n \"function\": {\n \"name\": \"play_music\",\n \"parameters\": {\n \"properties\": {\n \"genre\": {\n \"type\": \"string\",\n \"description\": \"The music genre\"\n },\n \"mood\": {\n \"type\": \"string\",\n \"description\": \"The mood of the music\"\n }\n },\n \"required\": [\n \"genre\"\n ],\n \"type\": \"object\"\n },\n \"description\": \"Play music based on user's preferences\"\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n### Format:\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI'm in the mood for some music. Can you play something for me?\n[END OF QUERY]", "role": "human" }, { "content": "Of course! Could you please tell me your preferred genre and mood for the music?", "role": "gpt" }, { "content": "คำถาม (Question): I would like to listen to some jazz music. And I'm feeling quite relaxed.", "role": "human" }, { "content": "[play_music(genre='jazz', mood='relaxed')]", "role": "gpt" } ]
12
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[END OF TASK INSTRUCTION]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[END OF FORMAT INSTRUCTION]\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_tip\",\n \"description\": \"Calculate the tip amount\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"bill_amount\": {\n \"type\": \"number\",\n \"description\": \"The total bill amount\"\n },\n \"tip_percentage\": {\n \"type\": \"number\",\n \"description\": \"The percentage of tip to be given\"\n }\n },\n \"required\": [\n \"bill_amount\",\n \"tip_percentage\"\n ]\n }\n }\n }\n]\n[END OF AVAILABLE TOOLS]", "role": "system" }, { "content": "Query: Hi, I need help with calculating a tip. My bill amount is $50 and I want to leave a 15% tip.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_tip\",\n \"arguments\": {\n \"bill_amount\": 50,\n \"tip_percentage\": 15\n }\n }\n]}", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nGreat, thanks for the help!\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
13
glaive-function-calling-v2-extended
[ { "content": "You are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n\n[BEGIN OF FORMAT INSTRUCTION]\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[END OF FORMAT INSTRUCTION]\n\nเครื่องมือ (Tools): [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_age\",\n \"description\": \"Calculate the age based on birthdate\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"birthdate\": {\n \"type\": \"string\",\n \"description\": \"The birthdate in YYYY-MM-DD format\"\n }\n }\n }\n }\n }\n]", "role": "system" }, { "content": "<query>\nHi, I was born on 1990-05-15. Can you tell me how old I am today?\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_age\",\n \"arguments\": {\n \"birthdate\": \"1990-05-15\"\n }\n }\n]}", "role": "gpt" } ]
14
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[TASK INSTRUCTION END]\n\nHere List of functions in JSON format\n[\n {\n \"function\": {\n \"name\": \"calculate_bmi\",\n \"description\": \"Calculate the Body Mass Index (BMI)\",\n \"parameters\": {\n \"required\": [\n \"weight\",\n \"height\"\n ],\n \"properties\": {\n \"weight\": {\n \"description\": \"The weight in kilograms\",\n \"type\": \"number\"\n },\n \"height\": {\n \"description\": \"The height in meters\",\n \"type\": \"number\"\n }\n },\n \"type\": \"object\"\n }\n },\n \"type\": \"function\"\n }\n]\n\n<format>\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n</format>", "role": "system" }, { "content": "คำถาม (Question): Hi, I would like to calculate my BMI. I weigh 70 kilograms and my height is 1.75 meters.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_bmi\",\n \"arguments\": {\n \"weight\": 70,\n \"height\": 1.75\n }\n }\n]}", "role": "gpt" } ]
15
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n</Task>\n\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"create_invoice\",\n \"description\": \"Create an invoice for a specific transaction\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"transaction_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the transaction\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The amount of the transaction\"\n },\n \"customer_name\": {\n \"type\": \"string\",\n \"description\": \"The name of the customer\"\n }\n },\n \"required\": [\n \"transaction_id\",\n \"amount\",\n \"customer_name\"\n ]\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"create_user\",\n \"description\": \"Create a new user\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the user\"\n },\n \"email\": {\n \"type\": \"string\",\n \"description\": \"The email address of the user\"\n },\n \"password\": {\n \"type\": \"string\",\n \"description\": \"The password for the user\"\n }\n },\n \"required\": [\n \"name\",\n \"email\",\n \"password\"\n ]\n }\n }\n }\n]\n\n[FORMAT INSTRUCTION START]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "### Instruction: I need to create an invoice for a transaction.", "role": "human" }, { "content": "Sure, I can help with that. Could you please provide me with the transaction ID, the amount of the transaction, and the customer's name?", "role": "gpt" }, { "content": "<query>\nThe transaction ID is 12345, the amount is $500, and the customer's name is John Doe.\n</query>", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"create_invoice\",\n \"arguments\": {\n \"transaction_id\": \"12345\",\n \"amount\": 500,\n \"customer_name\": \"John Doe\"\n }\n }\n]}", "role": "gpt" } ]
16
glaive-function-calling-v2-extended
[ { "content": "You are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n\n### Format:\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n\nเครื่องมือ (Tools): [\n {\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"name\",\n \"phone\"\n ],\n \"properties\": {\n \"phone\": {\n \"type\": \"string\",\n \"description\": \"The phone number of the contact\"\n },\n \"email\": {\n \"format\": \"email\",\n \"type\": \"string\",\n \"description\": \"The email address of the contact\"\n },\n \"name\": {\n \"description\": \"The name of the contact\",\n \"type\": \"string\"\n }\n }\n },\n \"name\": \"create_contact\",\n \"description\": \"Create a new contact\"\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nCan you order a pizza for me?\n[END OF QUERY]", "role": "human" }, { "content": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My capabilities are currently limited to the functions provided to me, such as creating a new contact.", "role": "gpt" } ]
17
glaive-function-calling-v2-extended
[ { "content": "You are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n\n### Format:\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n\n<tools>\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"parameters\": {\n \"required\": [\n \"loan_amount\",\n \"interest_rate\",\n \"loan_term\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"loan_term\": {\n \"description\": \"The loan term in years\",\n \"type\": \"integer\"\n },\n \"interest_rate\": {\n \"type\": \"number\",\n \"description\": \"The annual interest rate\"\n },\n \"loan_amount\": {\n \"type\": \"number\",\n \"description\": \"The amount of the loan\"\n }\n }\n },\n \"name\": \"calculate_mortgage_payment\",\n \"description\": \"Calculate the monthly mortgage payment amount\"\n }\n }\n]\n</tools>", "role": "system" }, { "content": "คำถาม (Question): Hi, I need help with calculating my mortgage payment.", "role": "human" }, { "content": "Of course, I can help with that. Could you please provide me with the loan amount, the annual interest rate, and the loan term in years?", "role": "gpt" }, { "content": "<query>\nSure, the loan amount is $200,000, the annual interest rate is 3.5%, and the loan term is 30 years.\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_mortgage_payment\",\n \"arguments\": {\n \"loan_amount\": 200000,\n \"interest_rate\": 3.5,\n \"loan_term\": 30\n }\n }\n]}", "role": "gpt" } ]
18
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n[TASK INSTRUCTION END]\n\n<tools>\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Generate an invoice\",\n \"parameters\": {\n \"properties\": {\n \"customer_name\": {\n \"description\": \"The name of the customer\",\n \"type\": \"string\"\n },\n \"invoice_items\": {\n \"description\": \"The list of items in the invoice\",\n \"items\": {\n \"properties\": {\n \"quantity\": {\n \"description\": \"The quantity of the item\",\n \"type\": \"integer\"\n },\n \"price\": {\n \"description\": \"The price of the item\",\n \"type\": \"number\"\n },\n \"item_name\": {\n \"description\": \"The name of the item\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"item_name\",\n \"quantity\",\n \"price\"\n ]\n },\n \"type\": \"array\"\n },\n \"tax_rate\": {\n \"description\": \"The applicable tax rate\",\n \"type\": \"number\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"customer_name\",\n \"invoice_items\"\n ]\n },\n \"name\": \"generate_invoice\"\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Generate a QR code image\",\n \"parameters\": {\n \"properties\": {\n \"size\": {\n \"type\": \"integer\",\n \"description\": \"The size of the QR code image\"\n },\n \"data\": {\n \"type\": \"string\",\n \"description\": \"The data to be encoded in the QR code\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"data\",\n \"size\"\n ]\n },\n \"name\": \"generate_qr_code\"\n }\n }\n]\n</tools>\n\n[FORMAT INSTRUCTION START]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "### Instruction: I need to generate an invoice for a customer named John Doe. He bought 2 apples for $1 each and 3 bananas for $0.5 each. The tax rate is 10%.", "role": "human" }, { "content": "[generate_invoice(customer_name='John Doe', invoice_items=[{'item_name': 'apple', 'quantity': 2, 'price': 1}, {'item_name': 'banana', 'quantity': 3, 'price': 0.5}], tax_rate=10)]", "role": "gpt" } ]
19
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[END OF TASK INSTRUCTION]\n\n<tools>\n[{\"type\": \"function\", \"function\": {\"parameters\": {\"required\": [\"query\"], \"properties\": {\"query\": {\"description\": \"The search term or topic to be searched on Wikipedia\", \"type\": \"string\"}}, \"type\": \"object\"}, \"name\": \"search_wikipedia\", \"description\": \"Search for a specific topic on Wikipedia\"}}]\n</tools>\n\n[FORMAT INSTRUCTION START]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "Query: Can you tell me about the Eiffel Tower?", "role": "human" }, { "content": "[\n {\n \"name\": \"search_wikipedia\",\n \"arguments\": {\n \"query\": \"Eiffel Tower\"\n }\n }\n]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThat's interesting. Can you tell me about Gustave Eiffel?\n[END OF QUERY]", "role": "human" }, { "content": "[\n {\n \"name\": \"search_wikipedia\",\n \"arguments\": {\n \"query\": \"Gustave Eiffel\"\n }\n }\n]", "role": "gpt" } ]
20
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[END OF TASK INSTRUCTION]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[END OF FORMAT INSTRUCTION]\n\nเครื่องมือ (Tools): [{\"type\": \"function\", \"function\": {\"parameters\": {\"type\": \"object\", \"properties\": {\"height\": {\"type\": \"number\", \"description\": \"The height in meters\"}, \"weight\": {\"description\": \"The weight in kilograms\", \"type\": \"number\"}}, \"required\": [\"weight\", \"height\"]}, \"description\": \"Calculate the Body Mass Index (BMI)\", \"name\": \"calculate_bmi\"}}]", "role": "system" }, { "content": "Query: Can you book a flight for me?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to book flights. My current function allows me to calculate Body Mass Index (BMI) based on the weight and height you provide. Is there anything else I can assist you with?", "role": "gpt" } ]
21
glaive-function-calling-v2-extended
[ { "content": "You are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n\nAPI Function: [{\"function\": {\"name\": \"generate_qr_code\", \"description\": \"Generate a QR code for a given input\", \"parameters\": {\"required\": [\"input_data\"], \"properties\": {\"input_data\": {\"type\": \"string\", \"description\": \"The data to be encoded in the QR code\"}}, \"type\": \"object\"}}, \"type\": \"function\"}]\n\n### Format:\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```", "role": "system" }, { "content": "Hi, I need a QR code for my website. Can you help me with that?", "role": "human" }, { "content": "Of course, I can help you with that. Could you please provide me with the URL of your website?", "role": "gpt" }, { "content": "Sure, it's www.mywebsite.com.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"generate_qr_code\",\n \"arguments\": {\n \"input_data\": \"www.mywebsite.com\"\n }\n }\n]}", "role": "gpt" } ]
22
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n</Task>\n\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"check_visa_requirements\",\n \"description\": \"Check visa requirements for a specific country\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"country\": {\n \"type\": \"string\",\n \"description\": \"The country to check visa requirements for\"\n }\n },\n \"required\": [\n \"country\"\n ]\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"search_movies\",\n \"description\": \"Search for movies based on keywords\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"keywords\": {\n \"type\": \"string\",\n \"description\": \"The keywords to search for in movie titles or actors\"\n }\n },\n \"required\": [\n \"keywords\"\n ]\n }\n }\n }\n]\n\n<format>\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n</format>", "role": "system" }, { "content": "Query: Hi, I am planning to travel to Japan. Can you tell me if I need a visa?", "role": "human" }, { "content": "[check_visa_requirements(country='Japan')]", "role": "gpt" }, { "content": "### Instruction: Okay, thank you for the information. What about France? Do I need a visa for France?", "role": "human" }, { "content": "[check_visa_requirements(country='France')]", "role": "gpt" } ]
23
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[END OF TASK INSTRUCTION]\n\n[FORMAT INSTRUCTION START]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[FORMAT INSTRUCTION END]\n\n[AVAILABLE TOOLS START]\n[\n {\n \"function\": {\n \"description\": \"Generate a QR code for a given string\",\n \"parameters\": {\n \"properties\": {\n \"text\": {\n \"description\": \"The text to encode in the QR code\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"text\"\n ]\n },\n \"name\": \"generate_qr_code\"\n },\n \"type\": \"function\"\n }\n]\n[AVAILABLE TOOLS END]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHey, I need a QR code for my website. Can you generate one for me?\n[END OF QUERY]", "role": "human" }, { "content": "Of course, I can help with that. Please provide me with the URL of your website.", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nSure, it's www.mywebsite.com.\n[END OF QUERY]", "role": "human" }, { "content": "[generate_qr_code(text='www.mywebsite.com')]", "role": "gpt" }, { "content": "Query: That's great! Now, can you also help me to post this QR code on my social media accounts?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to perform external tasks such as posting on social media. I suggest you download the QR code and post it manually on your social media accounts.", "role": "gpt" } ]
24
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n[END OF TASK INSTRUCTION]\n\n<format>\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n</format>\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_distance\",\n \"description\": \"Calculate the distance between two points on the map\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"start_point\": {\n \"type\": \"string\",\n \"description\": \"The starting point\"\n },\n \"end_point\": {\n \"type\": \"string\",\n \"description\": \"The end point\"\n }\n },\n \"required\": [\n \"start_point\",\n \"end_point\"\n ]\n }\n }\n }\n]\n[END OF AVAILABLE TOOLS]", "role": "system" }, { "content": "Query: Hi, I need to know the distance between New York and Los Angeles.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_distance\",\n \"arguments\": {\n \"start_point\": \"New York\",\n \"end_point\": \"Los Angeles\"\n }\n }\n]}", "role": "gpt" }, { "content": "### Instruction: That's quite a distance! What about the distance from London to Paris?", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_distance\",\n \"arguments\": {\n \"start_point\": \"London\",\n \"end_point\": \"Paris\"\n }\n }\n]}", "role": "gpt" }, { "content": "Query: Thanks for the information!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
25
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n<tools>\n[\n {\n \"function\": {\n \"description\": \"Calculate area of a geometric shape\",\n \"name\": \"calculate_area\",\n \"parameters\": {\n \"required\": [\n \"shape\",\n \"dimensions\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"shape\": {\n \"description\": \"The shape type (e.g. square, rectangle, circle)\",\n \"type\": \"string\"\n },\n \"dimensions\": {\n \"required\": [\n \"length\",\n \"width\",\n \"radius\"\n ],\n \"properties\": {\n \"length\": {\n \"description\": \"The length of the shape\",\n \"type\": \"number\"\n },\n \"radius\": {\n \"description\": \"The radius of the shape\",\n \"type\": \"number\"\n },\n \"width\": {\n \"description\": \"The width of the shape\",\n \"type\": \"number\"\n }\n },\n \"type\": \"object\"\n }\n }\n }\n },\n \"type\": \"function\"\n },\n {\n \"function\": {\n \"parameters\": {\n \"properties\": {\n \"username\": {\n \"type\": \"string\",\n \"description\": \"The username for the new account\"\n },\n \"password\": {\n \"description\": \"The password for the new account\",\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\",\n \"description\": \"The email address for the new account\"\n }\n },\n \"required\": [\n \"username\",\n \"password\",\n \"email\"\n ],\n \"type\": \"object\"\n },\n \"description\": \"Create a new user account\",\n \"name\": \"create_user_account\"\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n[FORMAT INSTRUCTION START]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "<query>\nI want to create a new account.\n</query>", "role": "human" }, { "content": "Sure, I can help with that. Could you please provide me with a username, password, and email address that you'd like to use for your new account?", "role": "gpt" }, { "content": "Sure, I want the username to be \"JohnDoe\", password to be \"password123\" and email to be \"johndoe@example.com\".", "role": "human" }, { "content": "[\n {\n \"name\": \"create_user_account\",\n \"arguments\": {\n \"username\": \"JohnDoe\",\n \"password\": \"password123\",\n \"email\": \"johndoe@example.com\"\n }\n }\n]", "role": "gpt" } ]
26
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n\n[AVAILABLE TOOLS START]\n[{\"function\": {\"parameters\": {\"required\": [\"word\"], \"properties\": {\"word\": {\"description\": \"The word for which to get the definition\", \"type\": \"string\"}}, \"type\": \"object\"}, \"description\": \"Get the definition of a word\", \"name\": \"get_definition\"}, \"type\": \"function\"}]\n[AVAILABLE TOOLS END]\n\n[FORMAT INSTRUCTION START]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "คำถาม (Question): What does the word 'serendipity' mean?", "role": "human" }, { "content": "[\n {\n \"name\": \"get_definition\",\n \"arguments\": {\n \"word\": \"serendipity\"\n }\n }\n]", "role": "gpt" }, { "content": "<query>\nInteresting! What about 'ephemeral'?\n</query>", "role": "human" }, { "content": "[\n {\n \"name\": \"get_definition\",\n \"arguments\": {\n \"word\": \"ephemeral\"\n }\n }\n]", "role": "gpt" }, { "content": "### Instruction: Thank you, that was helpful!", "role": "human" }, { "content": "You're welcome! If you have any other words you'd like to know the definition of, feel free to ask.", "role": "gpt" } ]
27
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n\n### Tools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"parameters\": {\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The topic to search for\"\n },\n \"language\": {\n \"description\": \"The language of the Wikipedia page\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"query\"\n ],\n \"type\": \"object\"\n },\n \"description\": \"Search for a topic on Wikipedia\",\n \"name\": \"search_wikipedia\"\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_definition\",\n \"description\": \"Get the definition of a word\",\n \"parameters\": {\n \"properties\": {\n \"word\": {\n \"type\": \"string\",\n \"description\": \"The word to get the definition for\"\n },\n \"language\": {\n \"type\": \"string\",\n \"description\": \"The language of the word\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"word\"\n ]\n }\n }\n }\n]\n\n[BEGIN OF FORMAT INSTRUCTION]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "<query>\nCan you find information about the Eiffel Tower in French?\n</query>", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"search_wikipedia\",\n \"arguments\": {\n \"query\": \"Eiffel Tower\",\n \"language\": \"French\"\n }\n }\n]}", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThat's interesting. Can you find more information about its construction?\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"search_wikipedia\",\n \"arguments\": {\n \"query\": \"Eiffel Tower construction\",\n \"language\": \"French\"\n }\n }\n]}", "role": "gpt" } ]
28
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n[END OF TASK INSTRUCTION]\n\n<tools>\n[{\"type\": \"function\", \"function\": {\"description\": \"Calculate the monthly payment for a loan\", \"name\": \"calculate_loan_payment\", \"parameters\": {\"type\": \"object\", \"required\": [\"loan_amount\", \"interest_rate\", \"loan_term\"], \"properties\": {\"loan_term\": {\"type\": \"integer\", \"description\": \"The term of the loan in years\"}, \"interest_rate\": {\"type\": \"number\", \"description\": \"The annual interest rate for the loan\"}, \"loan_amount\": {\"type\": \"number\", \"description\": \"The amount of the loan\"}}}}}]\n</tools>\n\n[FORMAT INSTRUCTION START]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "Query: Can you please book a flight for me from New York to London?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to book flights or perform external tasks. My current function allows me to calculate loan payments. If you need help with that, I'd be more than happy to assist you.", "role": "gpt" } ]
29
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n</Task>\n\n### Format:\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n\nTools: [{\"type\": \"function\", \"function\": {\"description\": \"Calculate the age based on date of birth\", \"parameters\": {\"type\": \"object\", \"properties\": {\"date_of_birth\": {\"description\": \"The date of birth in format YYYY-MM-DD\", \"type\": \"string\"}}, \"required\": [\"date_of_birth\"]}, \"name\": \"calculate_age\"}}]", "role": "system" }, { "content": "Query: Hello, can you help me calculate my age? I was born on 1990-05-15.", "role": "human" }, { "content": "[calculate_age(date_of_birth='1990-05-15')]", "role": "gpt" }, { "content": "Great, thanks! Can you also book a table for two at my favourite restaurant for tonight?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to perform external tasks like booking a table at a restaurant. My current functions are limited to calculating age based on date of birth. I recommend using a restaurant reservation app or website for your request.", "role": "gpt" } ]
30
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[END OF TASK INSTRUCTION]\n\n[BEGIN OF FORMAT INSTRUCTION]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[END OF FORMAT INSTRUCTION]\n\nHere List of functions in JSON format\n[\n {\n \"function\": {\n \"name\": \"calculate_tip\",\n \"description\": \"Calculate the tip amount\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"bill_amount\",\n \"tip_percentage\"\n ],\n \"properties\": {\n \"tip_percentage\": {\n \"description\": \"The tip percentage\",\n \"type\": \"number\"\n },\n \"bill_amount\": {\n \"description\": \"The total bill amount\",\n \"type\": \"number\"\n }\n }\n }\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "Hi, I need help with calculating a tip. My bill amount is $50 and I want to leave a 15% tip.", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"calculate_tip\",\n \"arguments\": {\n \"bill_amount\": 50,\n \"tip_percentage\": 15\n }\n }\n]}", "role": "gpt" }, { "content": "คำถาม (Question): Great, thanks for the help!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
31
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n[END OF TASK INSTRUCTION]\n\n[FORMAT INSTRUCTION START]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[FORMAT INSTRUCTION END]\n\n[\n {\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"word\",\n \"language\"\n ],\n \"properties\": {\n \"word\": {\n \"type\": \"string\",\n \"description\": \"The word to be translated\"\n },\n \"language\": {\n \"type\": \"string\",\n \"description\": \"The target language of the translation\"\n }\n }\n },\n \"name\": \"get_translation\",\n \"description\": \"Get the translation of a word\"\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "### Instruction: Can you order a pizza for me?", "role": "human" }, { "content": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My current capabilities are limited to the functions provided to me, such as translating words. If you need help with translations, feel free to ask!", "role": "gpt" } ]
32
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n</Task>\n\nเครื่องมือ (Tools): [{\"type\": \"function\", \"function\": {\"description\": \"Find nearby restaurants based on location\", \"name\": \"find_nearby_restaurants\", \"parameters\": {\"type\": \"object\", \"required\": [\"location\"], \"properties\": {\"price_range\": {\"description\": \"The price range to filter the results\", \"type\": \"string\"}, \"cuisine\": {\"type\": \"string\", \"description\": \"The type of cuisine to filter the results\"}, \"location\": {\"type\": \"string\", \"description\": \"The location to search for restaurants\"}}}}}]\n\n<format>\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n</format>", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI am in New York and I am looking for Italian restaurants. Can you help?\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"find_nearby_restaurants\",\n \"arguments\": {\n \"location\": \"New York\",\n \"cuisine\": \"Italian\"\n }\n }\n]}", "role": "gpt" }, { "content": "What about some budget-friendly options?", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"find_nearby_restaurants\",\n \"arguments\": {\n \"location\": \"New York\",\n \"cuisine\": \"Italian\",\n \"price_range\": \"$\"\n }\n }\n]}", "role": "gpt" } ]
33
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n[END OF TASK INSTRUCTION]\n\n<tools>\n[\n {\n \"function\": {\n \"name\": \"play_music\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"genre\": {\n \"type\": \"string\",\n \"description\": \"The genre of music to play\"\n },\n \"playlist\": {\n \"description\": \"The specific playlist to play\",\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"Play music based on user's preference\"\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n[FORMAT INSTRUCTION START]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "คำถาม (Question): Hey, can you play some jazz music for me?", "role": "human" }, { "content": "Sure, I can help with that. Do you have a specific playlist in mind or should I choose one for you?", "role": "gpt" }, { "content": "คำถาม (Question): You can choose one for me.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"play_music\",\n \"arguments\": {\n \"genre\": \"jazz\"\n }\n }\n]}", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThanks! Can you also order a pizza for me?\n[END OF QUERY]", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the ability to perform external tasks like ordering a pizza. I can play music based on your preference, but for tasks outside of this, you'll need to use the appropriate service or application.", "role": "gpt" } ]
34
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n[FORMAT INSTRUCTION START]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[FORMAT INSTRUCTION END]\n\nHere List of functions in JSON format\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"search_books\",\n \"description\": \"Search for books based on keywords\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"keywords\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The keywords to search for\"\n }\n },\n \"required\": [\n \"keywords\"\n ]\n }\n }\n }\n]", "role": "system" }, { "content": "<query>\nI am looking for some books on artificial intelligence. Can you help me find some?\n</query>", "role": "human" }, { "content": "[search_books(keywords=['artificial intelligence'])]", "role": "gpt" }, { "content": "คำถาม (Question): That's great! Can you also find some books on machine learning?", "role": "human" }, { "content": "[search_books(keywords=['machine learning'])]", "role": "gpt" } ]
35
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n</Task>\n\nHere List of functions in JSON format\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_bmi\",\n \"parameters\": {\n \"required\": [\n \"weight\",\n \"height\"\n ],\n \"properties\": {\n \"weight\": {\n \"type\": \"number\",\n \"description\": \"The weight in kilograms\"\n },\n \"height\": {\n \"description\": \"The height in meters\",\n \"type\": \"number\"\n }\n },\n \"type\": \"object\"\n },\n \"description\": \"Calculate Body Mass Index (BMI)\"\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Get details of a specific movie\",\n \"parameters\": {\n \"required\": [\n \"title\",\n \"year\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"year\": {\n \"type\": \"integer\",\n \"description\": \"The release year of the movie\"\n },\n \"title\": {\n \"description\": \"The title of the movie\",\n \"type\": \"string\"\n }\n }\n },\n \"name\": \"get_movie_details\"\n }\n }\n]\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.", "role": "system" }, { "content": "<query>\nHi, I would like to calculate my BMI. I weigh 70 kilograms and my height is 1.75 meters.\n</query>", "role": "human" }, { "content": "[calculate_bmi(weight=70, height=1.75)]", "role": "gpt" } ]
36
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n\n[FORMAT INSTRUCTION START]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[FORMAT INSTRUCTION END]\n\n[BEGIN OF AVAILABLE TOOLS]\n[{\"type\": \"function\", \"function\": {\"name\": \"calculate_loan_payment\", \"parameters\": {\"required\": [\"principal_amount\", \"interest_rate\", \"loan_term\"], \"type\": \"object\", \"properties\": {\"loan_term\": {\"description\": \"The loan term in years\", \"type\": \"integer\"}, \"principal_amount\": {\"type\": \"number\", \"description\": \"The principal amount of the loan\"}, \"interest_rate\": {\"description\": \"The annual interest rate of the loan\", \"type\": \"number\"}}}, \"description\": \"Calculate monthly loan payment\"}}]\n[END OF AVAILABLE TOOLS]", "role": "system" }, { "content": "### Instruction: Hi, I need help with calculating my loan payment.", "role": "human" }, { "content": "Of course, I can help with that. Could you please provide me with the principal amount of the loan, the annual interest rate, and the loan term in years?", "role": "gpt" }, { "content": "Sure, the principal amount is $200,000, the annual interest rate is 3.5%, and the loan term is 30 years.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_loan_payment\",\n \"arguments\": {\n \"principal_amount\": 200000,\n \"interest_rate\": 3.5,\n \"loan_term\": 30\n }\n }\n]}", "role": "gpt" } ]
37
glaive-function-calling-v2-extended
[ { "content": "You are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Play music from a specific genre or artist\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"genre\",\n \"artist\"\n ],\n \"properties\": {\n \"genre\": {\n \"description\": \"The genre of music to play\",\n \"type\": \"string\"\n },\n \"artist\": {\n \"description\": \"The artist whose music to play\",\n \"type\": \"string\"\n }\n }\n },\n \"name\": \"play_music\"\n }\n },\n {\n \"function\": {\n \"parameters\": {\n \"properties\": {\n \"lat1\": {\n \"type\": \"number\",\n \"description\": \"The latitude of point 1\"\n },\n \"lat2\": {\n \"description\": \"The latitude of point 2\",\n \"type\": \"number\"\n },\n \"lon2\": {\n \"description\": \"The longitude of point 2\",\n \"type\": \"number\"\n },\n \"lon1\": {\n \"description\": \"The longitude of point 1\",\n \"type\": \"number\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"lat1\",\n \"lon1\",\n \"lat2\",\n \"lon2\"\n ]\n },\n \"description\": \"Calculate the distance between two points\",\n \"name\": \"calculate_distance\"\n },\n \"type\": \"function\"\n }\n]\n\n### Format:\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```", "role": "system" }, { "content": "<query>\nHi, I need to know the distance between New York and Los Angeles. Can you help me with that?\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_distance\",\n \"arguments\": {\n \"lat1\": 40.7128,\n \"lon1\": -74.006,\n \"lat2\": 34.0522,\n \"lon2\": -118.2437\n }\n }\n]}", "role": "gpt" } ]
38
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[TASK INSTRUCTION END]\n\n[{\"type\": \"function\", \"function\": {\"name\": \"create_playlist\", \"description\": \"Create a new music playlist\", \"parameters\": {\"required\": [\"name\", \"songs\"], \"properties\": {\"songs\": {\"type\": \"array\", \"description\": \"The songs to include in the playlist\", \"items\": {\"type\": \"string\"}}, \"name\": {\"description\": \"The name of the playlist\", \"type\": \"string\"}}, \"type\": \"object\"}}}]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "<query>\nCan you help me book a flight to New York?\n</query>", "role": "human" }, { "content": "I'm sorry, but I currently don't have the capability to book flights. My available function is to create a music playlist. If you need help with that, feel free to ask!", "role": "gpt" } ]
39
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n</Task>\n\n### Format:\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n\n### Tools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price of a company\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"company\"\n ],\n \"properties\": {\n \"company\": {\n \"type\": \"string\",\n \"description\": \"The name of the company\"\n }\n }\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Generate a random password with specified length\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"length\"\n ],\n \"properties\": {\n \"length\": {\n \"description\": \"The length of the password\",\n \"type\": \"integer\"\n }\n }\n },\n \"name\": \"generate_password\"\n }\n }\n]", "role": "system" }, { "content": "### Instruction: Hey, can you tell me the current stock price of Apple?", "role": "human" }, { "content": "[get_stock_price(company='Apple')]", "role": "gpt" }, { "content": "คำถาม (Question): That's great! Can you also tell me the stock price of Microsoft?", "role": "human" }, { "content": "[get_stock_price(company='Microsoft')]", "role": "gpt" }, { "content": "<query>\nThank you for the information!\n</query>", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
40
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n</Task>\n\n<tools>\n[\n {\n \"function\": {\n \"name\": \"calculate_tax\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"income\",\n \"tax_rate\"\n ],\n \"properties\": {\n \"income\": {\n \"description\": \"The annual income\",\n \"type\": \"number\"\n },\n \"tax_rate\": {\n \"description\": \"The tax rate in percentage\",\n \"type\": \"number\"\n }\n }\n },\n \"description\": \"Calculate the tax amount based on income and tax rate\"\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n<format>\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n</format>", "role": "system" }, { "content": "### Instruction: Hi, I need to calculate my tax. My annual income is $50000 and the tax rate is 20%.", "role": "human" }, { "content": "[calculate_tax(income=50000, tax_rate=20)]", "role": "gpt" } ]
41
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n</Task>\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n\nHere List of functions in JSON format\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Search for movies based on title or genre\",\n \"parameters\": {\n \"required\": [\n \"query\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The search query (title or genre)\"\n }\n }\n },\n \"name\": \"search_movies\"\n }\n }\n]", "role": "system" }, { "content": "<query>\nI'm in the mood for a comedy movie. Can you suggest some?\n</query>", "role": "human" }, { "content": "[search_movies(query='comedy')]", "role": "gpt" }, { "content": "### Instruction: I've seen all of those. Can you suggest something else?", "role": "human" }, { "content": "[search_movies(query='comedy')]", "role": "gpt" } ]
42
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n\n<format>\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n</format>\n\n### Tools: [{\"type\": \"function\", \"function\": {\"name\": \"calculate_bmi\", \"description\": \"Calculate BMI (Body Mass Index)\", \"parameters\": {\"type\": \"object\", \"required\": [\"weight\", \"height\"], \"properties\": {\"weight\": {\"description\": \"The weight of the person in kilograms\", \"type\": \"number\"}, \"height\": {\"description\": \"The height of the person in meters\", \"type\": \"number\"}}}}}]", "role": "system" }, { "content": "<query>\nHi, I need to calculate my BMI. I weigh 70 kg and my height is 1.75 meters.\n</query>", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"calculate_bmi\",\n \"arguments\": {\n \"weight\": 70,\n \"height\": 1.75\n }\n }\n]}", "role": "gpt" }, { "content": "That's great to hear! I've been working out regularly. Thanks for the information.", "role": "human" }, { "content": "You're welcome! Keep up the good work. Regular exercise is key to maintaining a healthy BMI. If you have any other questions, feel free to ask.", "role": "gpt" } ]
43
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n[TASK INSTRUCTION END]\n\n### Format:\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n\nเครื่องมือ (Tools): [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"generate_random_quote\",\n \"parameters\": {},\n \"description\": \"Generate a random quote\"\n }\n }\n]", "role": "system" }, { "content": "Query: Can you book a flight for me from New York to London?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to book flights. My current function allows me to generate random quotes. Is there anything else I can assist you with?", "role": "gpt" } ]
44
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[END OF TASK INSTRUCTION]\n\n### Format:\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n\nAPI Function: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"create_todo\",\n \"description\": \"Create a new todo item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The title of the todo item\"\n },\n \"due_date\": {\n \"type\": \"string\",\n \"format\": \"date\",\n \"description\": \"The due date of the todo item\"\n },\n \"priority\": {\n \"type\": \"string\",\n \"description\": \"The priority of the todo item\"\n }\n },\n \"required\": [\n \"title\",\n \"due_date\",\n \"priority\"\n ]\n }\n }\n }\n]", "role": "system" }, { "content": "Query: I need to create a new todo item.", "role": "human" }, { "content": "Sure, I can help with that. Could you please provide me with the title, due date, and priority of the todo item?", "role": "gpt" }, { "content": "<query>\nThe title is \"Buy groceries\", the due date is \"2022-04-30\", and the priority is \"High\".\n</query>", "role": "human" }, { "content": "[\n {\n \"name\": \"create_todo\",\n \"arguments\": {\n \"title\": \"Buy groceries\",\n \"due_date\": \"2022-04-30\",\n \"priority\": \"High\"\n }\n }\n]", "role": "gpt" } ]
45
glaive-function-calling-v2-extended
[ { "content": "You are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n<tools>\n[\n {\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"keywords\"\n ],\n \"properties\": {\n \"keywords\": {\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The keywords to search for news articles\",\n \"type\": \"array\"\n },\n \"date_range\": {\n \"type\": \"object\",\n \"required\": [\n \"start_date\",\n \"end_date\"\n ],\n \"properties\": {\n \"end_date\": {\n \"description\": \"The end date of the news articles (YYYY-MM-DD)\",\n \"type\": \"string\"\n },\n \"start_date\": {\n \"type\": \"string\",\n \"description\": \"The start date of the news articles (YYYY-MM-DD)\"\n }\n }\n },\n \"language\": {\n \"type\": \"string\",\n \"description\": \"The language of the news articles\"\n }\n }\n },\n \"description\": \"Search for news articles based on given keywords\",\n \"name\": \"search_news\"\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n<format>\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n</format>", "role": "system" }, { "content": "### Instruction: Can you find me some news articles about the recent Mars Rover landing?", "role": "human" }, { "content": "[search_news(keywords=['Mars Rover landing'], language='English', date_range={'start_date': '2021-01-01', 'end_date': '2021-12-31'})]", "role": "gpt" }, { "content": "### Instruction: That's great! Can you find more articles but this time in French?", "role": "human" }, { "content": "[search_news(keywords=['Mars Rover landing'], language='French', date_range={'start_date': '2021-01-01', 'end_date': '2021-12-31'})]", "role": "gpt" } ]
46
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[END OF TASK INSTRUCTION]\n\nTools: [\n {\n \"function\": {\n \"name\": \"check_movie_timing\",\n \"description\": \"Check the timing of a movie in a theater\",\n \"parameters\": {\n \"properties\": {\n \"movie_title\": {\n \"type\": \"string\",\n \"description\": \"The title of the movie\"\n },\n \"theater_location\": {\n \"type\": \"string\",\n \"description\": \"The location of the theater\"\n },\n \"date\": {\n \"type\": \"string\",\n \"description\": \"The date to check for movie timing\",\n \"format\": \"date\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"movie_title\",\n \"theater_location\",\n \"date\"\n ]\n }\n },\n \"type\": \"function\"\n }\n]\n\n<format>\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n</format>", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, I want to watch the movie \"Inception\" tomorrow at the AMC theater in New York. Can you check the timings for me?\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"check_movie_timing\",\n \"arguments\": {\n \"movie_title\": \"Inception\",\n \"theater_location\": \"AMC theater in New York\",\n \"date\": \"tomorrow\"\n }\n }\n]}", "role": "gpt" } ]
47
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[TASK INSTRUCTION END]\n\nเครื่องมือ (Tools): [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_area\",\n \"parameters\": {\n \"required\": [\n \"shape\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"dimensions\": {\n \"type\": \"object\",\n \"properties\": {\n \"length\": {\n \"type\": \"number\",\n \"description\": \"The length of the shape\"\n },\n \"width\": {\n \"description\": \"The width of the shape\",\n \"type\": \"number\"\n },\n \"radius\": {\n \"description\": \"The radius of the shape (for circle)\",\n \"type\": \"number\"\n }\n }\n },\n \"shape\": {\n \"type\": \"string\",\n \"description\": \"The shape for which area needs to be calculated\"\n }\n }\n },\n \"description\": \"Calculate the area of a shape\"\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Search for books based on title, author, or genre\",\n \"name\": \"search_books\",\n \"parameters\": {\n \"properties\": {\n \"author\": {\n \"description\": \"The author of the book\",\n \"type\": \"string\"\n },\n \"genre\": {\n \"description\": \"The genre of the book\",\n \"type\": \"string\"\n },\n \"title\": {\n \"description\": \"The title of the book\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n }\n }\n }\n]\n\n[BEGIN OF FORMAT INSTRUCTION]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI am looking for a book but I can't remember the title. The author's name is George Orwell.\n[END OF QUERY]", "role": "human" }, { "content": "[search_books(author='George Orwell')]", "role": "gpt" }, { "content": "Query: Oh yes, I was looking for Animal Farm. Can you also find books in the same genre?", "role": "human" }, { "content": "[search_books(genre='Allegorical novella')]", "role": "gpt" } ]
48
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n[END OF TASK INSTRUCTION]\n\nTools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_loan_payment\",\n \"description\": \"Calculate the monthly loan payment\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"loan_amount\": {\n \"type\": \"number\",\n \"description\": \"The loan amount\"\n },\n \"interest_rate\": {\n \"type\": \"number\",\n \"description\": \"The interest rate per year\"\n },\n \"loan_term\": {\n \"type\": \"integer\",\n \"description\": \"The loan term in years\"\n }\n },\n \"required\": [\n \"loan_amount\",\n \"interest_rate\",\n \"loan_term\"\n ]\n }\n }\n }\n]\n\n### Format:\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```", "role": "system" }, { "content": "<query>\nHi, I need help with calculating my loan payment.\n</query>", "role": "human" }, { "content": "Of course, I can help with that. Could you please provide me with the loan amount, the interest rate per year, and the loan term in years?", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nSure, the loan amount is $50000, the interest rate is 5% per year, and the loan term is 10 years.\n[END OF QUERY]", "role": "human" }, { "content": "[\n {\n \"name\": \"calculate_loan_payment\",\n \"arguments\": {\n \"loan_amount\": 50000,\n \"interest_rate\": 5,\n \"loan_term\": 10\n }\n }\n]", "role": "gpt" } ]
49
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n[TASK INSTRUCTION END]\n\n[FORMAT INSTRUCTION START]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[FORMAT INSTRUCTION END]\n\nTools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Calculate the age based on date of birth\",\n \"parameters\": {\n \"properties\": {\n \"date_of_birth\": {\n \"type\": \"string\",\n \"description\": \"The date of birth in the format 'YYYY-MM-DD'\"\n }\n },\n \"required\": [\n \"date_of_birth\"\n ],\n \"type\": \"object\"\n },\n \"name\": \"calculate_age\"\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"update_calendar\",\n \"description\": \"Update a calendar with an event\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"event_title\",\n \"start_time\",\n \"end_time\"\n ],\n \"properties\": {\n \"end_time\": {\n \"description\": \"The end time of the event\",\n \"type\": \"string\"\n },\n \"event_title\": {\n \"type\": \"string\",\n \"description\": \"The title of the event\"\n },\n \"start_time\": {\n \"type\": \"string\",\n \"description\": \"The start time of the event\"\n }\n }\n }\n }\n }\n]", "role": "system" }, { "content": "Query: Hey, I need to add an event to my calendar. It's a meeting with my team on 15th March from 10 AM to 12 PM. The title should be \"Team Meeting\".", "role": "human" }, { "content": "[\n {\n \"name\": \"update_calendar\",\n \"arguments\": {\n \"event_title\": \"Team Meeting\",\n \"start_time\": \"15th March, 10 AM\",\n \"end_time\": \"15th March, 12 PM\"\n }\n }\n]", "role": "gpt" }, { "content": "คำถาม (Question): Great, thanks for your help!", "role": "human" }, { "content": "You're welcome! If you have any other events to schedule, feel free to ask.", "role": "gpt" } ]
50
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n</Task>\n\n### Format:\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n\n### Tools: [\n {\n \"function\": {\n \"name\": \"generate_password\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"length\"\n ],\n \"properties\": {\n \"include_symbols\": {\n \"description\": \"Include symbols in the password\",\n \"type\": \"boolean\"\n },\n \"length\": {\n \"type\": \"integer\",\n \"description\": \"The length of the password\"\n },\n \"include_numbers\": {\n \"type\": \"boolean\",\n \"description\": \"Include numbers in the password\"\n }\n }\n },\n \"description\": \"Generate a random password\"\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "<query>\nI need a new password. Can you generate one for me?\n</query>", "role": "human" }, { "content": "Of course! How long would you like your password to be? And would you like it to include numbers and symbols?", "role": "gpt" }, { "content": "### Instruction: I want it to be 12 characters long and it should include both numbers and symbols.", "role": "human" }, { "content": "[\n {\n \"name\": \"generate_password\",\n \"arguments\": {\n \"length\": 12,\n \"include_numbers\": true,\n \"include_symbols\": true\n }\n }\n]", "role": "gpt" } ]
51
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n[TASK INSTRUCTION END]\n\n[FORMAT INSTRUCTION START]\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[FORMAT INSTRUCTION END]\n\nTools: [{\"type\": \"function\", \"function\": {\"parameters\": {\"required\": [\"location\", \"check_in_date\", \"check_out_date\"], \"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\", \"description\": \"The location to search for hotels\"}, \"check_in_date\": {\"description\": \"The check-in date\", \"type\": \"string\"}, \"check_out_date\": {\"description\": \"The check-out date\", \"type\": \"string\"}}}, \"name\": \"search_hotels\", \"description\": \"Search for hotels in a specific location\"}}]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, I need to find a hotel in New York from 1st May to 7th May.\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"search_hotels\",\n \"arguments\": {\n \"location\": \"New York\",\n \"check_in_date\": \"2022-05-01\",\n \"check_out_date\": \"2022-05-07\"\n }\n }\n]}", "role": "gpt" }, { "content": "คำถาม (Question): That's great! I'll go with Hotel B.", "role": "human" }, { "content": "Excellent choice! I hope you have a wonderful stay at Hotel B.", "role": "gpt" } ]
52
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n</Task>\n\nเครื่องมือ (Tools): [{\"function\": {\"name\": \"calculate_age\", \"parameters\": {\"type\": \"object\", \"properties\": {\"date_of_birth\": {\"description\": \"The date of birth in YYYY-MM-DD format\", \"type\": \"string\"}}, \"required\": [\"date_of_birth\"]}, \"description\": \"Calculate the age based on date of birth\"}, \"type\": \"function\"}]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "### Instruction: Hi, I was born on 1990-05-15. Can you tell me how old I am today?", "role": "human" }, { "content": "[calculate_age(date_of_birth='1990-05-15')]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nOh, time flies! Thank you for the information.\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
53
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[END OF TASK INSTRUCTION]\n\n### Format:\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n\nAPI Function: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"generate_random_password\",\n \"description\": \"Generate a random password with specified length and complexity\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"length\": {\n \"type\": \"integer\",\n \"description\": \"The length of the password\"\n },\n \"include_lowercase\": {\n \"type\": \"boolean\",\n \"description\": \"Whether to include lowercase characters in the password\"\n },\n \"include_uppercase\": {\n \"type\": \"boolean\",\n \"description\": \"Whether to include uppercase characters in the password\"\n },\n \"include_numbers\": {\n \"type\": \"boolean\",\n \"description\": \"Whether to include numbers in the password\"\n },\n \"include_symbols\": {\n \"type\": \"boolean\",\n \"description\": \"Whether to include symbols in the password\"\n }\n },\n \"required\": [\n \"length\",\n \"include_lowercase\",\n \"include_uppercase\",\n \"include_numbers\",\n \"include_symbols\"\n ]\n }\n }\n }\n]", "role": "system" }, { "content": "Can you order a pizza for me?", "role": "human" }, { "content": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My current capabilities are limited to the functions provided to me. In this case, I can help you generate a random password with specified length and complexity.", "role": "gpt" } ]
54
glaive-function-calling-v2-extended
[ { "content": "You are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n\n<tools>\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_age\",\n \"description\": \"Calculate the age based on birthdate\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"birthdate\"\n ],\n \"properties\": {\n \"birthdate\": {\n \"type\": \"string\",\n \"description\": \"The birthdate of the person\"\n }\n }\n }\n }\n }\n]\n</tools>\n\n[BEGIN OF FORMAT INSTRUCTION]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, can you tell me how old I am? My birthdate is 1990-05-15.\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"calculate_age\",\n \"arguments\": {\n \"birthdate\": \"1990-05-15\"\n }\n }\n]}", "role": "gpt" } ]
55
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n</Task>\n\n### Format:\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n\nTools: [{\"type\": \"function\", \"function\": {\"name\": \"convert_currency\", \"parameters\": {\"required\": [\"amount\", \"from_currency\", \"to_currency\"], \"properties\": {\"amount\": {\"type\": \"number\", \"description\": \"The amount to be converted\"}, \"from_currency\": {\"description\": \"The currency to convert from\", \"type\": \"string\"}, \"to_currency\": {\"type\": \"string\", \"description\": \"The currency to convert to\"}}, \"type\": \"object\"}, \"description\": \"Convert an amount from one currency to another\"}}]", "role": "system" }, { "content": "<query>\nHi, I need to convert 1000 USD to Euros. Can you help me with that?\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"convert_currency\",\n \"arguments\": {\n \"amount\": 1000,\n \"from_currency\": \"USD\",\n \"to_currency\": \"EUR\"\n }\n }\n]}", "role": "gpt" }, { "content": "<query>\nGreat, thanks! Now, can you convert 500 Euros back to USD?\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"convert_currency\",\n \"arguments\": {\n \"amount\": 500,\n \"from_currency\": \"EUR\",\n \"to_currency\": \"USD\"\n }\n }\n]}", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThank you for your help!\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
56
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[TASK INSTRUCTION END]\n\n[FORMAT INSTRUCTION START]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[FORMAT INSTRUCTION END]\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"function\": {\n \"name\": \"translate_text\",\n \"description\": \"Translate text from one language to another\",\n \"parameters\": {\n \"required\": [\n \"text\",\n \"source_language\",\n \"target_language\"\n ],\n \"properties\": {\n \"target_language\": {\n \"type\": \"string\",\n \"description\": \"The target language for translation\"\n },\n \"source_language\": {\n \"type\": \"string\",\n \"description\": \"The source language of the text\"\n },\n \"text\": {\n \"type\": \"string\",\n \"description\": \"The text to be translated\"\n }\n },\n \"type\": \"object\"\n }\n },\n \"type\": \"function\"\n }\n]\n[END OF AVAILABLE TOOLS]", "role": "system" }, { "content": "### Instruction: Hi, I have a sentence in French that I need translated to English.", "role": "human" }, { "content": "Sure, I can help with that. Please provide me with the sentence.", "role": "gpt" }, { "content": "Query: The sentence is \"Je suis très heureux de vous rencontrer\".", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"translate_text\",\n \"arguments\": {\n \"text\": \"Je suis tr\\u00e8s heureux de vous rencontrer\",\n \"source_language\": \"fr\",\n \"target_language\": \"en\"\n }\n }\n]}", "role": "gpt" }, { "content": "คำถาม (Question): Great, thanks! Can you also book a table for two at a French restaurant for tonight?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the ability to perform external tasks such as booking tables at restaurants. My capabilities are limited to the functions provided to me. Currently, I can only translate text from one language to another.", "role": "gpt" } ]
57
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[END OF TASK INSTRUCTION]\n\nTools: [\n {\n \"function\": {\n \"name\": \"calculate_tax\",\n \"description\": \"Calculate the tax amount based on the income and tax rate\",\n \"parameters\": {\n \"properties\": {\n \"income\": {\n \"description\": \"The income amount\",\n \"type\": \"number\"\n },\n \"tax_rate\": {\n \"description\": \"The tax rate in percentage\",\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"income\",\n \"tax_rate\"\n ],\n \"type\": \"object\"\n }\n },\n \"type\": \"function\"\n }\n]\n\n<format>\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n</format>", "role": "system" }, { "content": "<query>\nHi, I need help with calculating my tax. My income is $50000 and the tax rate is 20%.\n</query>", "role": "human" }, { "content": "[calculate_tax(income=50000, tax_rate=20)]", "role": "gpt" }, { "content": "<query>\nOh, I see. What if my income is $60000 with the same tax rate?\n</query>", "role": "human" }, { "content": "[calculate_tax(income=60000, tax_rate=20)]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThank you for the information.\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
58
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n</Task>\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"function\": {\n \"name\": \"generate_password\",\n \"description\": \"Generate a random password with specified length\",\n \"parameters\": {\n \"properties\": {\n \"length\": {\n \"type\": \"integer\",\n \"description\": \"The length of the password\"\n }\n },\n \"required\": [\n \"length\"\n ],\n \"type\": \"object\"\n }\n },\n \"type\": \"function\"\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_shipping_cost\",\n \"description\": \"Calculate the shipping cost for a package\",\n \"parameters\": {\n \"properties\": {\n \"dimensions\": {\n \"required\": [\n \"length\",\n \"width\",\n \"height\"\n ],\n \"properties\": {\n \"width\": {\n \"type\": \"number\",\n \"description\": \"The width of the package in centimeters\"\n },\n \"height\": {\n \"description\": \"The height of the package in centimeters\",\n \"type\": \"number\"\n },\n \"length\": {\n \"description\": \"The length of the package in centimeters\",\n \"type\": \"number\"\n }\n },\n \"type\": \"object\"\n },\n \"weight\": {\n \"type\": \"number\",\n \"description\": \"The weight of the package in kilograms\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"weight\",\n \"dimensions\"\n ]\n }\n }\n }\n]\n[END OF AVAILABLE TOOLS]\n\n[BEGIN OF FORMAT INSTRUCTION]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "<query>\nHi, I need to ship a package. Can you help me calculate the cost?\n</query>", "role": "human" }, { "content": "Of course! I can help with that. Could you please provide me with the weight of the package in kilograms and its dimensions in centimeters (length, width, and height)?", "role": "gpt" }, { "content": "คำถาม (Question): The package weighs 5 kilograms. The length is 30 centimeters, the width is 20 centimeters, and the height is 15 centimeters.", "role": "human" }, { "content": "[calculate_shipping_cost(weight=5, dimensions={'length': 30, 'width': 20, 'height': 15})]", "role": "gpt" } ]
59
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n[END OF TASK INSTRUCTION]\n\n<tools>\n[\n {\n \"function\": {\n \"parameters\": {\n \"properties\": {\n \"shipping_method\": {\n \"description\": \"The shipping method to be used\",\n \"type\": \"string\"\n },\n \"weight\": {\n \"type\": \"number\",\n \"description\": \"The weight of the package in kilograms\"\n },\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"The destination of the package\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"weight\",\n \"destination\",\n \"shipping_method\"\n ]\n },\n \"description\": \"Calculate the shipping cost of a package\",\n \"name\": \"calculate_shipping_cost\"\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n[FORMAT INSTRUCTION START]\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "### Instruction: Hi, I need to ship a package to New York. It weighs around 5 kilograms. Can you tell me how much it would cost if I use express shipping?", "role": "human" }, { "content": "[calculate_shipping_cost(weight=5, destination='New York', shipping_method='express')]", "role": "gpt" }, { "content": "That's a bit expensive. What if I use standard shipping?", "role": "human" }, { "content": "[calculate_shipping_cost(weight=5, destination='New York', shipping_method='standard')]", "role": "gpt" }, { "content": "คำถาม (Question): That sounds more reasonable. Thank you for your help!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
60
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[TASK INSTRUCTION END]\n\nHere List of functions in JSON format\n[{\"type\": \"function\", \"function\": {\"name\": \"calculate_loan_payment\", \"description\": \"Calculate the monthly payment for a loan\", \"parameters\": {\"type\": \"object\", \"properties\": {\"loan_amount\": {\"description\": \"The total amount of the loan\", \"type\": \"number\"}, \"loan_term\": {\"type\": \"integer\", \"description\": \"The term of the loan in months\"}, \"interest_rate\": {\"type\": \"number\", \"description\": \"The annual interest rate on the loan\"}}, \"required\": [\"loan_amount\", \"interest_rate\", \"loan_term\"]}}}]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "คำถาม (Question): Hi, I need some help with a loan I'm considering.", "role": "human" }, { "content": "Of course, I'd be happy to help. Could you please provide me with the total amount of the loan, the annual interest rate, and the term of the loan in months?", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nSure, the total amount of the loan is $50000, the annual interest rate is 5%, and the term of the loan is 60 months.\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_loan_payment\",\n \"arguments\": {\n \"loan_amount\": 50000,\n \"interest_rate\": 5,\n \"loan_term\": 60\n }\n }\n]}", "role": "gpt" } ]
61
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[TASK INSTRUCTION END]\n\n<format>\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n</format>\n\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Calculate the distance between two locations\",\n \"name\": \"calculate_distance\",\n \"parameters\": {\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"The destination location\"\n },\n \"origin\": {\n \"type\": \"string\",\n \"description\": \"The origin location\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"origin\",\n \"destination\"\n ]\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Create a new todo item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"due_date\": {\n \"type\": \"string\",\n \"format\": \"date\",\n \"description\": \"The due date of the todo item\"\n },\n \"title\": {\n \"description\": \"The title of the todo item\",\n \"type\": \"string\"\n },\n \"description\": {\n \"description\": \"The description of the todo item\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"title\",\n \"description\",\n \"due_date\"\n ]\n },\n \"name\": \"create_todo\"\n }\n }\n]", "role": "system" }, { "content": "### Instruction: I need to create a new todo item.", "role": "human" }, { "content": "Sure, I can help with that. Could you please provide me with the title, description, and due date for the todo item?", "role": "gpt" }, { "content": "Query: The title is \"Grocery Shopping\", the description is \"Buy groceries for the week\", and the due date is \"2022-05-15\".", "role": "human" }, { "content": "[\n {\n \"name\": \"create_todo\",\n \"arguments\": {\n \"title\": \"Grocery Shopping\",\n \"description\": \"Buy groceries for the week\",\n \"due_date\": \"2022-05-15\"\n }\n }\n]", "role": "gpt" }, { "content": "No, that's all for now. Thank you!", "role": "human" }, { "content": "You're welcome! Don't hesitate to ask if you need any more help. Have a great day!", "role": "gpt" } ]
62
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n\n[FORMAT INSTRUCTION START]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[FORMAT INSTRUCTION END]\n\n<tools>\n[\n {\n \"function\": {\n \"name\": \"convert_currency\",\n \"description\": \"Convert currency from one type to another\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert to\"\n },\n \"from\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert from\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The amount of currency to convert\"\n }\n },\n \"required\": [\n \"amount\",\n \"from\",\n \"to\"\n ]\n }\n },\n \"type\": \"function\"\n }\n]\n</tools>", "role": "system" }, { "content": "คำถาม (Question): Hi, I need to convert 1000 USD to Euros. Can you help me with that?", "role": "human" }, { "content": "[convert_currency(amount=1000, from='USD', to='EUR')]", "role": "gpt" }, { "content": "That's great. Now, can you book a flight for me from New York to Paris?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to book flights. My functions are limited to the ones provided to me. Currently, I can only assist with currency conversion. I recommend using a trusted travel agency or website to book your flight.", "role": "gpt" } ]
63
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n[END OF TASK INSTRUCTION]\n\n[FORMAT INSTRUCTION START]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[FORMAT INSTRUCTION END]\n\n[AVAILABLE TOOLS START]\n[{\"function\": {\"parameters\": {\"required\": [\"title\", \"year\"], \"type\": \"object\", \"properties\": {\"title\": {\"type\": \"string\", \"description\": \"The title of the movie\"}, \"year\": {\"type\": \"integer\", \"description\": \"The release year of the movie\"}}}, \"name\": \"get_movie_details\", \"description\": \"Get details of a movie\"}, \"type\": \"function\"}]\n[AVAILABLE TOOLS END]", "role": "system" }, { "content": "### Instruction: Hi, can you help me find some information about a movie?", "role": "human" }, { "content": "Of course! I can help you with that. Please provide me with the title and the release year of the movie.", "role": "gpt" }, { "content": "<query>\nThe movie is \"Inception\" and it was released in 2010.\n</query>", "role": "human" }, { "content": "[get_movie_details(title='Inception', year=2010)]", "role": "gpt" }, { "content": "That's great! Can you also book a ticket for me to watch this movie in the nearest cinema?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to perform external tasks such as booking movie tickets. I suggest using a ticket booking app or website for this task.", "role": "gpt" } ]
64
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n[END OF TASK INSTRUCTION]\n\n[AVAILABLE TOOLS START]\n[{\"function\": {\"description\": \"Calculate the distance between two locations\", \"name\": \"calculate_distance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"origin\": {\"type\": \"string\", \"description\": \"The origin location\"}, \"destination\": {\"description\": \"The destination location\", \"type\": \"string\"}}, \"required\": [\"origin\", \"destination\"]}}, \"type\": \"function\"}]\n[AVAILABLE TOOLS END]\n\n[BEGIN OF FORMAT INSTRUCTION]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "Can you please book a flight for me from New York to London?", "role": "human" }, { "content": "I'm sorry, but I'm unable to assist with booking flights. My current capabilities allow me to calculate the distance between two locations. However, I don't have the ability to perform external tasks such as booking flights.", "role": "gpt" } ]
65
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n</Task>\n\n[BEGIN OF FORMAT INSTRUCTION]\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[END OF FORMAT INSTRUCTION]\n\nเครื่องมือ (Tools): [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_distance\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"The destination location\"\n },\n \"origin\": {\n \"description\": \"The origin location\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"origin\",\n \"destination\"\n ]\n },\n \"description\": \"Calculate the distance between two locations\"\n }\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, I need to know the distance between New York and Los Angeles.\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_distance\",\n \"arguments\": {\n \"origin\": \"New York\",\n \"destination\": \"Los Angeles\"\n }\n }\n]}", "role": "gpt" }, { "content": "คำถาม (Question): That's quite far. What about the distance from New York to Chicago?", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_distance\",\n \"arguments\": {\n \"origin\": \"New York\",\n \"destination\": \"Chicago\"\n }\n }\n]}", "role": "gpt" }, { "content": "<query>\nThank you for the information.\n</query>", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
66
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n[FORMAT INSTRUCTION START]\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n[FORMAT INSTRUCTION END]\n\nHere List of functions in JSON format\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"to_currency\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert to\"\n },\n \"from_currency\": {\n \"description\": \"The currency to convert from\",\n \"type\": \"string\"\n },\n \"amount\": {\n \"description\": \"The amount to be converted\",\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"amount\",\n \"from_currency\",\n \"to_currency\"\n ]\n },\n \"description\": \"Convert currency from one type to another\",\n \"name\": \"convert_currency\"\n }\n }\n]", "role": "system" }, { "content": "คำถาม (Question): Hi, I need to convert 1000 US dollars to Euros. Can you help me with that?", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"convert_currency\",\n \"arguments\": {\n \"amount\": 1000,\n \"from_currency\": \"USD\",\n \"to_currency\": \"EUR\"\n }\n }\n]}", "role": "gpt" }, { "content": "That's great! Can you also book a flight for me from New York to Paris?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to book flights. My current function is to assist with currency conversion. You might want to use a travel booking website or app for your flight booking needs.", "role": "gpt" } ]
67
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n[END OF TASK INSTRUCTION]\n\n[BEGIN OF FORMAT INSTRUCTION]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[END OF FORMAT INSTRUCTION]\n\n[{\"function\": {\"description\": \"Search for books based on title or author\", \"parameters\": {\"properties\": {\"query\": {\"description\": \"The title or author to search for\", \"type\": \"string\"}}, \"required\": [\"query\"], \"type\": \"object\"}, \"name\": \"search_books\"}, \"type\": \"function\"}]", "role": "system" }, { "content": "Query: Hi, I'm looking for books by J.K. Rowling. Can you help me find them?", "role": "human" }, { "content": "[search_books(query='J.K. Rowling')]", "role": "gpt" }, { "content": "<query>\nThat's great! Can you also find books by George R.R. Martin?\n</query>", "role": "human" }, { "content": "[search_books(query='George R.R. Martin')]", "role": "gpt" } ]
68
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[END OF TASK INSTRUCTION]\n\nAPI Function: [\n {\n \"function\": {\n \"name\": \"calculate_age\",\n \"description\": \"Calculate the age based on birthdate\",\n \"parameters\": {\n \"properties\": {\n \"birthdate\": {\n \"description\": \"The birthdate in YYYY-MM-DD format\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"birthdate\"\n ],\n \"type\": \"object\"\n }\n },\n \"type\": \"function\"\n }\n]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "<query>\nHi, I was born on 1990-05-15. Can you tell me how old I am today?\n</query>", "role": "human" }, { "content": "[calculate_age(birthdate='1990-05-15')]", "role": "gpt" } ]
69
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[END OF TASK INSTRUCTION]\n\n<format>\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n</format>\n\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Search for books based on given criteria\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"author\": {\n \"description\": \"The author of the book\",\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The title of the book\"\n },\n \"genre\": {\n \"type\": \"string\",\n \"description\": \"The genre of the book\"\n }\n }\n },\n \"name\": \"search_books\"\n }\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI am looking for a book but I can't remember the title. I know it's a mystery novel by Agatha Christie.\n[END OF QUERY]", "role": "human" }, { "content": "[search_books(author='Agatha Christie', genre='mystery')]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nYes, it's \"And Then There Were None\". Thank you!\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you need help with anything else, feel free to ask.", "role": "gpt" } ]
70
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n</Task>\n\n[{\"type\": \"function\", \"function\": {\"description\": \"Calculate the area of a rectangle\", \"name\": \"calculate_rectangle_area\", \"parameters\": {\"required\": [\"length\", \"width\"], \"properties\": {\"length\": {\"type\": \"number\", \"description\": \"The length of the rectangle\"}, \"width\": {\"description\": \"The width of the rectangle\", \"type\": \"number\"}}, \"type\": \"object\"}}}]\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.", "role": "system" }, { "content": "คำถาม (Question): Hi, I need to calculate the area of a rectangle. The length is 5 and the width is 3.", "role": "human" }, { "content": "[calculate_rectangle_area(length=5, width=3)]", "role": "gpt" }, { "content": "Thank you! That was helpful.", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
71
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n\nTools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_gross_salary\",\n \"description\": \"Calculate the gross salary based on the hourly rate and number of hours worked\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"hourly_rate\",\n \"hours_worked\"\n ],\n \"properties\": {\n \"hourly_rate\": {\n \"type\": \"number\",\n \"description\": \"Hourly rate of pay\"\n },\n \"hours_worked\": {\n \"description\": \"Number of hours worked\",\n \"type\": \"number\"\n }\n }\n }\n }\n }\n]", "role": "system" }, { "content": "Can you please book a flight for me from New York to London?", "role": "human" }, { "content": "I'm sorry, but I can't assist with that. My current capabilities are limited to calculating gross salary based on the hourly rate and number of hours worked. I don't have the ability to book flights or perform other external tasks.", "role": "gpt" } ]
72
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[TASK INSTRUCTION END]\n\n### Tools: [\n {\n \"function\": {\n \"name\": \"make_note\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"title\",\n \"content\"\n ],\n \"properties\": {\n \"title\": {\n \"description\": \"The title of the note\",\n \"type\": \"string\"\n },\n \"content\": {\n \"type\": \"string\",\n \"description\": \"The content of the note\"\n }\n }\n },\n \"description\": \"Create a note with a title and content\"\n },\n \"type\": \"function\"\n },\n {\n \"function\": {\n \"name\": \"get_stock_price\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"company\"\n ],\n \"properties\": {\n \"company\": {\n \"type\": \"string\",\n \"description\": \"The name of the company\"\n }\n }\n },\n \"description\": \"Get the current stock price of a company\"\n },\n \"type\": \"function\"\n }\n]\n\n### Format:\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]", "role": "system" }, { "content": "Hi, can you tell me the current stock price of Apple?", "role": "human" }, { "content": "[get_stock_price(company='Apple')]", "role": "gpt" }, { "content": "That's great. Can you also tell me the stock price of Microsoft?", "role": "human" }, { "content": "[get_stock_price(company='Microsoft')]", "role": "gpt" }, { "content": "คำถาม (Question): Thank you for the information.", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
73
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n### Format:\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n\n[AVAILABLE TOOLS START]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current price of a stock\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"stock_symbol\": {\n \"type\": \"string\",\n \"description\": \"The symbol of the stock\"\n }\n },\n \"required\": [\n \"stock_symbol\"\n ]\n }\n }\n }\n]\n[AVAILABLE TOOLS END]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, can you tell me the current price of Apple's stock?\n[END OF QUERY]", "role": "human" }, { "content": "[get_stock_price(stock_symbol='AAPL')]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThat's great. Can you also tell me the price of Microsoft's stock?\n[END OF QUERY]", "role": "human" }, { "content": "[get_stock_price(stock_symbol='MSFT')]", "role": "gpt" }, { "content": "<query>\nThank you for the information.\n</query>", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
74
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n<format>\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n</format>\n\n### Tools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_age_difference\",\n \"description\": \"Calculate the age difference between two people\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"birth_date1\": {\n \"type\": \"string\",\n \"description\": \"The birth date of the first person\"\n },\n \"birth_date2\": {\n \"type\": \"string\",\n \"description\": \"The birth date of the second person\"\n }\n },\n \"required\": [\n \"birth_date1\",\n \"birth_date2\"\n ]\n }\n }\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, I want to know the age difference between my brother and me. My birth date is 1995-06-15 and my brother's birth date is 2000-08-20.\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"calculate_age_difference\",\n \"arguments\": {\n \"birth_date1\": \"1995-06-15\",\n \"birth_date2\": \"2000-08-20\"\n }\n }\n]}", "role": "gpt" }, { "content": "<query>\nThank you for the information.\n</query>", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
75
glaive-function-calling-v2-extended
[ { "content": "You are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n\n<tools>\n[\n {\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"loan_term\": {\n \"description\": \"The term of the loan in months\",\n \"type\": \"integer\"\n },\n \"interest_rate\": {\n \"type\": \"number\",\n \"description\": \"The annual interest rate of the loan\"\n },\n \"principal\": {\n \"description\": \"The principal amount of the loan\",\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"principal\",\n \"interest_rate\",\n \"loan_term\"\n ]\n },\n \"description\": \"Calculate the monthly payment for a loan\",\n \"name\": \"calculate_loan_payment\"\n },\n \"type\": \"function\"\n }\n]\n</tools>", "role": "system" }, { "content": "### Instruction: Can you help me book a flight to New York?", "role": "human" }, { "content": "I'm sorry, but as an AI, I don't have the capability to book flights. My current function is to calculate loan payments. If you need help with that, feel free to ask!", "role": "gpt" } ]
76
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n\nAPI Function: [{\"type\": \"function\", \"function\": {\"parameters\": {\"properties\": {\"keywords\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}, \"description\": \"The keywords to search for\"}}, \"required\": [\"keywords\"], \"type\": \"object\"}, \"name\": \"search_articles\", \"description\": \"Search for articles based on keywords\"}}, {\"function\": {\"description\": \"Calculate the discounted price based on original price and discount percentage\", \"parameters\": {\"properties\": {\"original_price\": {\"type\": \"number\", \"description\": \"The original price\"}, \"discount_percentage\": {\"type\": \"number\", \"description\": \"The discount percentage\"}}, \"required\": [\"original_price\", \"discount_percentage\"], \"type\": \"object\"}, \"name\": \"calculate_discount\"}, \"type\": \"function\"}]\n\n### Format:\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```", "role": "system" }, { "content": "<query>\nI need to find articles on climate change.\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"search_articles\",\n \"arguments\": {\n \"keywords\": [\n \"climate change\"\n ]\n }\n }\n]}", "role": "gpt" }, { "content": "### Instruction: Great, can you also find articles on renewable energy?", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"search_articles\",\n \"arguments\": {\n \"keywords\": [\n \"renewable energy\"\n ]\n }\n }\n]}", "role": "gpt" } ]
77
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a function calling AI model. You may call one or more functions if possible or not to use them to assist with the user query. When you think you require function/tool calls, but you cannot call any tool function, Please point it out. Don't make assumptions about what values to plug into functions.\n[TASK INSTRUCTION END]\n\n[BEGIN OF FORMAT INSTRUCTION]\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n[END OF FORMAT INSTRUCTION]\n\n[\n {\n \"function\": {\n \"description\": \"Generate an invoice for a transaction\",\n \"name\": \"generate_invoice\",\n \"parameters\": {\n \"properties\": {\n \"customer_name\": {\n \"type\": \"string\",\n \"description\": \"The name of the customer\"\n },\n \"items\": {\n \"type\": \"array\",\n \"description\": \"The list of items in the transaction\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"name\",\n \"quantity\",\n \"price\"\n ],\n \"properties\": {\n \"quantity\": {\n \"type\": \"integer\",\n \"description\": \"The quantity of the item\"\n },\n \"price\": {\n \"type\": \"number\",\n \"description\": \"The price of the item\"\n },\n \"name\": {\n \"description\": \"The name of the item\",\n \"type\": \"string\"\n }\n }\n }\n },\n \"total_amount\": {\n \"type\": \"number\",\n \"description\": \"The total amount of the transaction\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"customer_name\",\n \"total_amount\",\n \"items\"\n ]\n }\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI need to generate an invoice for a customer named John Doe. The total amount is $200. The items are a book for $50, a pen for $10, and a notebook for $140.\n[END OF QUERY]", "role": "human" }, { "content": "[generate_invoice(customer_name='John Doe', total_amount=200, items=[{'name': 'book', 'quantity': 1, 'price': 50}, {'name': 'pen', 'quantity': 1, 'price': 10}, {'name': 'notebook', 'quantity': 1, 'price': 140}])]", "role": "gpt" } ]
78
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n[TASK INSTRUCTION END]\n\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Calculate the monthly payment amount for a loan\",\n \"name\": \"calculate_loan_payment\",\n \"parameters\": {\n \"properties\": {\n \"loan_term\": {\n \"description\": \"The duration of the loan in years\",\n \"type\": \"integer\"\n },\n \"loan_amount\": {\n \"type\": \"number\",\n \"description\": \"The total amount of the loan\"\n },\n \"interest_rate\": {\n \"type\": \"number\",\n \"description\": \"The annual interest rate for the loan\"\n }\n },\n \"required\": [\n \"loan_amount\",\n \"interest_rate\",\n \"loan_term\"\n ],\n \"type\": \"object\"\n }\n }\n }\n]\n\n<format>\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n</format>", "role": "system" }, { "content": "Hi, I need help with calculating my loan payment. I have a loan of $50000 with an annual interest rate of 5% and the loan term is 10 years.", "role": "human" }, { "content": "[calculate_loan_payment(loan_amount=50000, interest_rate=5, loan_term=10)]", "role": "gpt" }, { "content": "คำถาม (Question): That's great. Thank you for the help.", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
79
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n</Task>\n\n### Format:\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n\n### Tools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"parameters\": {\n \"properties\": {\n \"origin\": {\n \"description\": \"The starting location\",\n \"type\": \"string\"\n },\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"The destination location\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"origin\",\n \"destination\"\n ]\n },\n \"description\": \"Calculate the distance between two locations\",\n \"name\": \"calculate_route_distance\"\n }\n }\n]", "role": "system" }, { "content": "<query>\nHi, I need to know the distance between New York and Los Angeles.\n</query>", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_route_distance\",\n \"arguments\": {\n \"origin\": \"New York\",\n \"destination\": \"Los Angeles\"\n }\n }\n]}", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThat's quite far. What about the distance from New York to Chicago?\n[END OF QUERY]", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_route_distance\",\n \"arguments\": {\n \"origin\": \"New York\",\n \"destination\": \"Chicago\"\n }\n }\n]}", "role": "gpt" }, { "content": "คำถาม (Question): Thank you for the information.", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
80
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n</Task>\n\nAPI Function: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"convert_currency\",\n \"description\": \"Convert currency from one unit to another\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The amount to be converted\"\n },\n \"source_currency\": {\n \"type\": \"string\",\n \"description\": \"The currency to be converted from\"\n },\n \"target_currency\": {\n \"type\": \"string\",\n \"description\": \"The currency to be converted to\"\n }\n },\n \"required\": [\n \"amount\",\n \"source_currency\",\n \"target_currency\"\n ]\n }\n }\n }\n]\n\n[FORMAT INSTRUCTION START]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "<query>\nCan you book a flight for me from New York to London?\n</query>", "role": "human" }, { "content": "I'm sorry, but I'm unable to assist with booking flights. My current capabilities are limited to the functions provided to me, such as converting currency. If you need help with that or any other function I'm equipped with, feel free to ask.", "role": "gpt" } ]
81
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n[TASK INSTRUCTION END]\n\nTools: [\n {\n \"function\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"from_currency\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert from\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The amount to be converted\"\n },\n \"to_currency\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert to\"\n }\n },\n \"required\": [\n \"amount\",\n \"from_currency\",\n \"to_currency\"\n ]\n },\n \"description\": \"Convert currency from one type to another\",\n \"name\": \"convert_currency\"\n },\n \"type\": \"function\"\n }\n]\n\n<format>\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n</format>", "role": "system" }, { "content": "Query: Hi, I need to convert 1000 USD to Euros. Can you help me with that?", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"convert_currency\",\n \"arguments\": {\n \"amount\": 1000,\n \"from_currency\": \"USD\",\n \"to_currency\": \"EUR\"\n }\n }\n]}", "role": "gpt" }, { "content": "Great, now I need to convert 500 GBP to USD.", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"convert_currency\",\n \"arguments\": {\n \"amount\": 500,\n \"from_currency\": \"GBP\",\n \"to_currency\": \"USD\"\n }\n }\n]}", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThank you for your help!\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
82
glaive-function-calling-v2-extended
[ { "content": "You are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n[BEGIN OF AVAILABLE TOOLS]\n[{\"function\": {\"description\": \"Get the definition of a word\", \"parameters\": {\"required\": [\"word\"], \"properties\": {\"word\": {\"description\": \"The word to get the definition\", \"type\": \"string\"}}, \"type\": \"object\"}, \"name\": \"get_definition\"}, \"type\": \"function\"}]\n[END OF AVAILABLE TOOLS]\n\n### Format:\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.", "role": "system" }, { "content": "Query: What does the word 'serendipity' mean?", "role": "human" }, { "content": "[get_definition(word='serendipity')]", "role": "gpt" }, { "content": "### Instruction: What about 'ephemeral'?", "role": "human" }, { "content": "[get_definition(word='ephemeral')]", "role": "gpt" }, { "content": "And 'quintessential'?", "role": "human" }, { "content": "[get_definition(word='quintessential')]", "role": "gpt" } ]
83
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n</Task>\n\n[FORMAT INSTRUCTION START]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[FORMAT INSTRUCTION END]\n\n[BEGIN OF AVAILABLE TOOLS]\n[{\"function\": {\"parameters\": {\"type\": \"object\", \"required\": [\"word\"], \"properties\": {\"word\": {\"type\": \"string\", \"description\": \"The word to get the definition for\"}}}, \"name\": \"get_definition\", \"description\": \"Get the definition of a word\"}, \"type\": \"function\"}]\n[END OF AVAILABLE TOOLS]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nCan you please order a pizza for me?\n[END OF QUERY]", "role": "human" }, { "content": "I'm sorry, but I don't have the capability to perform external tasks like ordering a pizza. My current function allows me to provide definitions of words. If you need a definition for a specific word, feel free to ask!", "role": "gpt" } ]
84
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n[BEGIN OF FORMAT INSTRUCTION]\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n[END OF FORMAT INSTRUCTION]\n\nAPI Function: [\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Find a recipe based on ingredients\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"ingredients\"\n ],\n \"properties\": {\n \"ingredients\": {\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The ingredients available\",\n \"type\": \"array\"\n }\n }\n },\n \"name\": \"find_recipe\"\n }\n }\n]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nI have some chicken, bell peppers, and rice. What can I make with these?\n[END OF QUERY]", "role": "human" }, { "content": "[find_recipe(ingredients=['chicken', 'bell peppers', 'rice'])]", "role": "gpt" } ]
85
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n</Task>\n\n[BEGIN OF FORMAT INSTRUCTION]\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n[END OF FORMAT INSTRUCTION]\n\nHere List of functions in JSON format\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"schedule_meeting\",\n \"description\": \"Schedule a meeting with multiple participants\",\n \"parameters\": {\n \"properties\": {\n \"meeting_details\": {\n \"required\": [\n \"title\",\n \"datetime\",\n \"participants\"\n ],\n \"properties\": {\n \"participants\": {\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\",\n \"description\": \"The email addresses of the meeting participants\"\n },\n \"datetime\": {\n \"format\": \"date-time\",\n \"type\": \"string\",\n \"description\": \"The date and time of the meeting\"\n },\n \"title\": {\n \"description\": \"The title of the meeting\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n }\n },\n \"type\": \"object\",\n \"required\": [\n \"meeting_details\"\n ]\n }\n }\n },\n {\n \"function\": {\n \"name\": \"convert_currency\",\n \"description\": \"Convert one currency to another\",\n \"parameters\": {\n \"required\": [\n \"amount\",\n \"from\",\n \"to\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The amount to be converted\"\n },\n \"to\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert to\"\n },\n \"from\": {\n \"type\": \"string\",\n \"description\": \"The currency to convert from\"\n }\n }\n }\n },\n \"type\": \"function\"\n }\n]", "role": "system" }, { "content": "I need to schedule a meeting with my team.", "role": "human" }, { "content": "Sure, I can help with that. Could you please provide me with the title of the meeting, the date and time, and the email addresses of the participants?", "role": "gpt" }, { "content": "### Instruction: The title of the meeting is \"Project Update\", it should be on 10th of next month at 10 AM. The participants are john@example.com, mary@example.com, and peter@example.com.", "role": "human" }, { "content": "[schedule_meeting(meeting_details={'title': 'Project Update', 'datetime': '2022-10-10T10:00:00', 'participants': ['john@example.com', 'mary@example.com', 'peter@example.com']})]", "role": "gpt" } ]
86
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n\n<format>\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```\n</format>\n\nTools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"parameters\": {\n \"required\": [\n \"weight\",\n \"height\"\n ],\n \"type\": \"object\",\n \"properties\": {\n \"height\": {\n \"type\": \"number\",\n \"description\": \"The height in meters\"\n },\n \"weight\": {\n \"type\": \"number\",\n \"description\": \"The weight in kilograms\"\n }\n }\n },\n \"name\": \"calculate_bmi\",\n \"description\": \"Calculate the Body Mass Index (BMI)\"\n }\n }\n]", "role": "system" }, { "content": "### Instruction: Hi, I need to calculate my BMI. I weigh 75 kilograms and my height is 1.8 meters.", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"calculate_bmi\",\n \"arguments\": {\n \"weight\": 75,\n \"height\": 1.8\n }\n }\n]}", "role": "gpt" }, { "content": "### Instruction: Great, thanks! Can you also book a table for me at a nearby restaurant?", "role": "human" }, { "content": "I'm sorry, but I'm unable to assist with that. My current capabilities are limited to the functions provided to me, and booking a table at a restaurant is not one of them. I recommend using a restaurant reservation app for this task.", "role": "gpt" } ]
87
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n[END OF TASK INSTRUCTION]\n\nAPI Function: [\n {\n \"function\": {\n \"name\": \"convert_currency\",\n \"parameters\": {\n \"properties\": {\n \"amount\": {\n \"description\": \"The amount to convert\",\n \"type\": \"number\"\n },\n \"to_currency\": {\n \"description\": \"The currency to convert to\",\n \"type\": \"string\"\n },\n \"from_currency\": {\n \"description\": \"The currency to convert from\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"amount\",\n \"from_currency\",\n \"to_currency\"\n ],\n \"type\": \"object\"\n },\n \"description\": \"Convert currency from one currency to another\"\n },\n \"type\": \"function\"\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Calculate the age based on the birthdate\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"birthdate\": {\n \"type\": \"string\",\n \"description\": \"The birthdate in format YYYY-MM-DD\"\n }\n },\n \"required\": [\n \"birthdate\"\n ]\n },\n \"name\": \"calculate_age\"\n }\n }\n]\n\n[BEGIN OF FORMAT INSTRUCTION]\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "Hi, can you help me calculate my age? I was born on 1990-05-15.", "role": "human" }, { "content": "[calculate_age(birthdate='1990-05-15')]", "role": "gpt" } ]
88
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n[TASK INSTRUCTION END]\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Search for a book based on title or author\",\n \"name\": \"search_book\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The title of the book\"\n },\n \"author\": {\n \"description\": \"The author of the book\",\n \"type\": \"string\"\n }\n }\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Calculate the profit margin based on the cost price and selling price\",\n \"parameters\": {\n \"properties\": {\n \"cost_price\": {\n \"description\": \"The cost price of the product\",\n \"type\": \"number\"\n },\n \"selling_price\": {\n \"type\": \"number\",\n \"description\": \"The selling price of the product\"\n }\n },\n \"required\": [\n \"cost_price\",\n \"selling_price\"\n ],\n \"type\": \"object\"\n },\n \"name\": \"calculate_profit_margin\"\n }\n }\n]\n[END OF AVAILABLE TOOLS]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "คำถาม (Question): Hi, I need some help with calculating profit margin. I sold a product for $150 which I had bought for $100. Can you help me calculate the profit margin?", "role": "human" }, { "content": "[calculate_profit_margin(cost_price=100, selling_price=150)]", "role": "gpt" } ]
89
glaive-function-calling-v2-extended
[ { "content": "[BEGIN OF TASK INSTRUCTION]\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n[END OF TASK INSTRUCTION]\n\n[FORMAT INSTRUCTION START]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[FORMAT INSTRUCTION END]\n\nHere List of functions in JSON format\n[{\"type\": \"function\", \"function\": {\"name\": \"calculate_loan_payment\", \"description\": \"Calculate the monthly loan payment\", \"parameters\": {\"properties\": {\"interest_rate\": {\"type\": \"number\", \"description\": \"The annual interest rate\"}, \"principal\": {\"description\": \"The principal amount of the loan\", \"type\": \"number\"}, \"loan_term\": {\"type\": \"integer\", \"description\": \"The loan term in years\"}}, \"required\": [\"principal\", \"interest_rate\", \"loan_term\"], \"type\": \"object\"}}}]", "role": "system" }, { "content": "[BEGIN OF QUERY]\nHi, I need help with calculating my monthly loan payment.\n[END OF QUERY]", "role": "human" }, { "content": "Of course, I can help with that. Could you please provide me with the principal amount of the loan, the annual interest rate, and the loan term in years?", "role": "gpt" }, { "content": "Sure, the principal amount is $200,000, the annual interest rate is 5%, and the loan term is 30 years.", "role": "human" }, { "content": "[\n {\n \"name\": \"calculate_loan_payment\",\n \"arguments\": {\n \"principal\": 200000,\n \"interest_rate\": 5,\n \"loan_term\": 30\n }\n }\n]", "role": "gpt" } ]
90
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are skilled in creating functions and must determine when to use function or tool calls to achieve the goal or when not to use them. You will be provided with a question and a set of available functions. Based on the question, you should decide whether to make one or more function calls. If none of the functions are suitable, indicate this and decline to answer. Additionally, if the question lacks necessary parameters for the function, make sure to mention it.\n[TASK INSTRUCTION END]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```\n[END OF FORMAT INSTRUCTION]\n\nAPI Function: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"generate_random_number\",\n \"description\": \"Generate a random number between a specified range\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"min\": {\n \"type\": \"number\",\n \"description\": \"The minimum value of the range\"\n },\n \"max\": {\n \"type\": \"number\",\n \"description\": \"The maximum value of the range\"\n }\n },\n \"required\": [\n \"min\",\n \"max\"\n ]\n }\n }\n }\n]", "role": "system" }, { "content": "<query>\nI need a random number between 1 and 100.\n</query>", "role": "human" }, { "content": "[generate_random_number(min=1, max=100)]", "role": "gpt" }, { "content": "คำถาม (Question): Can you generate another random number but this time between 200 and 300?", "role": "human" }, { "content": "[generate_random_number(min=200, max=300)]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nThank you, that's all I needed.\n[END OF QUERY]", "role": "human" }, { "content": "You're welcome! If you need anything else, feel free to ask.", "role": "gpt" } ]
91
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n</Task>\n\nHere List of functions in JSON format\n[{\"function\": {\"parameters\": {\"type\": \"object\", \"required\": [], \"properties\": {\"mood\": {\"type\": \"string\", \"description\": \"The desired mood for the music\"}, \"genre\": {\"description\": \"The preferred music genre\", \"type\": \"string\"}}}, \"name\": \"play_music\", \"description\": \"Play music based on user's preferences\"}, \"type\": \"function\"}]\n\n### Format:\nThe output MUST strictly adhere to the following JSON format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct.\n```{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}```", "role": "system" }, { "content": "I'm feeling a bit down. Can you play some music that might cheer me up?", "role": "human" }, { "content": "{\"tool_calls\": [\n {\n \"name\": \"play_music\",\n \"arguments\": {\n \"genre\": \"pop\",\n \"mood\": \"happy\"\n }\n }\n]}", "role": "gpt" }, { "content": "<query>\nThat's perfect, thank you!\n</query>", "role": "human" }, { "content": "You're welcome! If you need anything else, just let me know.", "role": "gpt" } ]
92
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n<tools>\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_distance\",\n \"description\": \"Calculate the distance between two locations\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"origin\": {\n \"type\": \"string\",\n \"description\": \"The starting location\"\n },\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"The destination location\"\n }\n },\n \"required\": [\n \"origin\",\n \"destination\"\n ]\n }\n }\n }\n]\n</tools>\n\n### Format:\n```[function_name1(params_name1=params_value1, params_name2=params_value2...), function_name2(params)]```", "role": "system" }, { "content": "คำถาม (Question): Hi, I am planning a road trip. Can you tell me the distance between New York and Los Angeles?", "role": "human" }, { "content": "[calculate_distance(origin='New York', destination='Los Angeles')]", "role": "gpt" }, { "content": "### Instruction: That's quite a distance! What about the distance from Los Angeles to San Francisco?", "role": "human" }, { "content": "[calculate_distance(origin='Los Angeles', destination='San Francisco')]", "role": "gpt" }, { "content": "Query: Thanks for the information!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
93
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are an AI model designed to call functions. You may use one or more functions to assist with the user's query, or decide not to use them if unnecessary. If you believe a function call is needed but can't make one, make sure to highlight this. Avoid making assumptions about the values required for the functions.\n</Task>\n\nTools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_distance\",\n \"description\": \"Calculate the distance between two points\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"latitude1\": {\n \"type\": \"number\",\n \"description\": \"The latitude of the first point\"\n },\n \"longitude1\": {\n \"type\": \"number\",\n \"description\": \"The longitude of the first point\"\n },\n \"latitude2\": {\n \"type\": \"number\",\n \"description\": \"The latitude of the second point\"\n },\n \"longitude2\": {\n \"type\": \"number\",\n \"description\": \"The longitude of the second point\"\n }\n },\n \"required\": [\n \"latitude1\",\n \"longitude1\",\n \"latitude2\",\n \"longitude2\"\n ]\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_tip\",\n \"description\": \"Calculate the tip amount based on the bill total and tip percentage\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"bill_total\": {\n \"type\": \"number\",\n \"description\": \"The total amount of the bill\"\n },\n \"tip_percentage\": {\n \"type\": \"number\",\n \"description\": \"The percentage of the tip\"\n }\n },\n \"required\": [\n \"bill_total\",\n \"tip_percentage\"\n ]\n }\n }\n }\n]\n\n[BEGIN OF FORMAT INSTRUCTION]\n{\"tool_functions\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ... (more tool calls as required)]}\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "Query: Hi, I need to know the distance between New York and Los Angeles. Can you help me with that?", "role": "human" }, { "content": "{\"tool_functions\": [\n {\n \"name\": \"calculate_distance\",\n \"arguments\": {\n \"latitude1\": 40.7128,\n \"longitude1\": -74.006,\n \"latitude2\": 34.0522,\n \"longitude2\": -118.2437\n }\n }\n]}", "role": "gpt" } ]
94
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou have the ability to access specific tools, but it's important to use them wisely. Only call upon these tools when they are truly needed to fulfill a task, otherwise, rely on your own knowledge to provide assistance.\n[TASK INSTRUCTION END]\n\n[FORMAT INSTRUCTION START]\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n[FORMAT INSTRUCTION END]\n\nTools: [{\"function\": {\"parameters\": {\"properties\": {\"shape\": {\"type\": \"string\", \"description\": \"The shape (e.g. circle, rectangle, triangle)\"}, \"dimensions\": {\"properties\": {\"length\": {\"description\": \"The length of the rectangle (if shape is rectangle)\", \"type\": \"number\"}, \"height\": {\"description\": \"The height of the triangle (if shape is triangle)\", \"type\": \"number\"}, \"width\": {\"type\": \"number\", \"description\": \"The width of the rectangle (if shape is rectangle)\"}, \"base\": {\"type\": \"number\", \"description\": \"The base of the triangle (if shape is triangle)\"}, \"radius\": {\"description\": \"The radius of the circle (if shape is circle)\", \"type\": \"number\"}}, \"type\": \"object\"}}, \"required\": [\"shape\", \"dimensions\"], \"type\": \"object\"}, \"name\": \"calculate_area\", \"description\": \"Calculate the area of a shape\"}, \"type\": \"function\"}]", "role": "system" }, { "content": "Query: I need to calculate the area of a rectangle. The length is 10 units and the width is 5 units.", "role": "human" }, { "content": "[calculate_area(shape='rectangle', dimensions={'length': 10, 'width': 5})]", "role": "gpt" }, { "content": "[BEGIN OF QUERY]\nNow, I have a circle with a radius of 7 units. Can you calculate the area for this one too?\n[END OF QUERY]", "role": "human" }, { "content": "[calculate_area(shape='circle', dimensions={'radius': 7})]", "role": "gpt" }, { "content": "คำถาม (Question): Thank you for your help!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
95
glaive-function-calling-v2-extended
[ { "content": "You are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n\nTools: [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"generate_random_number\",\n \"description\": \"Generate a random number within a range\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"min\": {\n \"type\": \"integer\",\n \"description\": \"The minimum value of the range\"\n },\n \"max\": {\n \"type\": \"integer\",\n \"description\": \"The maximum value of the range\"\n }\n },\n \"required\": [\n \"min\",\n \"max\"\n ]\n }\n }\n }\n]\n\n<format>\nIf you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] You SHOULD NOT include any other text in the response.\n</format>", "role": "system" }, { "content": "คำถาม (Question): I need a random number between 1 and 100.", "role": "human" }, { "content": "[generate_random_number(min=1, max=100)]", "role": "gpt" }, { "content": "Can you generate another random number but this time between 200 and 300?", "role": "human" }, { "content": "[generate_random_number(min=200, max=300)]", "role": "gpt" }, { "content": "### Instruction: Thank you, that's all I needed.", "role": "human" }, { "content": "You're welcome! If you need anything else, feel free to ask.", "role": "gpt" } ]
96
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are a helpful assistant with access to various functions. It's your responsibility to decide when using a function or tool is essential to accomplish the task and when it's better to avoid them. Use them only when necessary.\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"calculate_area\",\n \"description\": \"Calculate the area of a shape\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"shape\": {\n \"type\": \"string\",\n \"description\": \"The shape for which the area will be calculated\"\n },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n },\n \"description\": \"The dimensions of the shape\"\n }\n },\n \"required\": [\n \"shape\",\n \"dimensions\"\n ]\n }\n }\n }\n]\n[END OF AVAILABLE TOOLS]\n\n[BEGIN OF FORMAT INSTRUCTION]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[END OF FORMAT INSTRUCTION]", "role": "system" }, { "content": "### Instruction: Hi, I need to calculate the area of a rectangle. The length is 5 units and the width is 3 units.", "role": "human" }, { "content": "[\n {\n \"name\": \"calculate_area\",\n \"arguments\": {\n \"shape\": \"rectangle\",\n \"dimensions\": [\n 5,\n 3\n ]\n }\n }\n]", "role": "gpt" }, { "content": "### Instruction: Great! Now, I have a circle with a radius of 4 units. Can you help me calculate the area?", "role": "human" }, { "content": "[\n {\n \"name\": \"calculate_area\",\n \"arguments\": {\n \"shape\": \"circle\",\n \"dimensions\": [\n 4\n ]\n }\n }\n]", "role": "gpt" }, { "content": "### Instruction: Thank you for your help!", "role": "human" }, { "content": "You're welcome! If you have any other questions, feel free to ask.", "role": "gpt" } ]
97
glaive-function-calling-v2-extended
[ { "content": "[TASK INSTRUCTION START]\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n[TASK INSTRUCTION END]\n\n<tools>\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"generate_password\",\n \"description\": \"Generate a random password\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"length\": {\n \"type\": \"integer\",\n \"description\": \"The length of the password\"\n }\n },\n \"required\": [\n \"length\"\n ]\n }\n }\n }\n]\n</tools>\n\n<format>\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n</format>", "role": "system" }, { "content": "<query>\nHi, I need a new password. Can you generate one for me?\n</query>", "role": "human" }, { "content": "Of course, I can help with that. How long would you like your password to be?", "role": "gpt" }, { "content": "### Instruction: I would like it to be 12 characters long.", "role": "human" }, { "content": "[generate_password(length=12)]", "role": "gpt" } ]
98
glaive-function-calling-v2-extended
[ { "content": "<Task>\nYou are a helpful assistant with access to the following functions. You must determine when it's necessary to use function or tool calls to achieve the goal and when it's better not to use them. Just use them if required.\n</Task>\n\n<tools>\n[\n {\n \"function\": {\n \"name\": \"analyze_sentiment\",\n \"description\": \"Analyze the sentiment of a text\",\n \"parameters\": {\n \"required\": [\n \"text\"\n ],\n \"properties\": {\n \"text\": {\n \"description\": \"The text to be analyzed\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n }\n },\n \"type\": \"function\"\n }\n]\n</tools>\n\n[FORMAT INSTRUCTION START]\n[func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "Query: Hey, I wrote a poem and I want to know if it has a positive or negative sentiment. Here it is: \"The sun rises, casting a golden glow. Birds chirp, a melody only they know. Flowers bloom, a sight to behold. Life's beauty, never gets old.\"", "role": "human" }, { "content": "[analyze_sentiment(text=\"The sun rises, casting a golden glow. Birds chirp, a melody only they know. Flowers bloom, a sight to behold. Life's beauty, never gets old.\")]", "role": "gpt" } ]
99
glaive-function-calling-v2-extended
[ { "content": "### Task Instruction:\nYou are an expert in composing functions. You must decide that when to use function/tool calls to achieve the purpose or not to use function/tool calls. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out.\n\n[AVAILABLE TOOLS START]\n[\n {\n \"type\": \"function\",\n \"function\": {\n \"description\": \"Search for recipes based on given ingredients\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"ingredients\": {\n \"description\": \"Ingredients to include in the recipe\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"cuisine\": {\n \"type\": \"string\",\n \"description\": \"The cuisine type of the recipe\"\n }\n }\n },\n \"name\": \"search_recipes\"\n }\n }\n]\n[AVAILABLE TOOLS END]\n\n[FORMAT INSTRUCTION START]\n```[{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}, ...]```\n[FORMAT INSTRUCTION END]", "role": "system" }, { "content": "<query>\nI have some chicken, bell peppers and onions. Can you find me a recipe?\n</query>", "role": "human" }, { "content": "[\n {\n \"name\": \"search_recipes\",\n \"arguments\": {\n \"ingredients\": [\n \"chicken\",\n \"bell peppers\",\n \"onions\"\n ]\n }\n }\n]", "role": "gpt" }, { "content": "คำถาม (Question): That sounds delicious! Can you find me an Italian recipe with the same ingredients?", "role": "human" }, { "content": "[\n {\n \"name\": \"search_recipes\",\n \"arguments\": {\n \"ingredients\": [\n \"chicken\",\n \"bell peppers\",\n \"onions\"\n ],\n \"cuisine\": \"Italian\"\n }\n }\n]", "role": "gpt" } ]
100