LLaMA-Factory/data/glaive_func_call.json
hiyouga 4e3bfb799d support function calling
Former-commit-id: d9f1cae35150cce594a7abd96dd2beb811fa33f2
2024-01-18 09:54:23 +08:00

68 lines
3.4 KiB
JSON

[
{
"conversations": [
{
"from": "human",
"value": "I need a new password. Can you generate one for me?"
},
{
"from": "gpt",
"value": "Of course. How long would you like your password to be? And would you like it to include symbols?"
},
{
"from": "human",
"value": "I would like it to be 12 characters long and yes, please include symbols."
},
{
"from": "function_call",
"value": "{\"name\": \"generate_password\", \"arguments\": {\"length\": 12, \"include_symbols\": true}}"
},
{
"from": "observation",
"value": "{\"password\": \"4&7j#9@1Q6*\"}"
},
{
"from": "gpt",
"value": "Here is your new password: 4&7j#9@1Q6*. Please make sure to save it in a secure location."
}
],
"tools": "[{\"name\": \"generate_password\", \"description\": \"Generate a random password\", \"parameters\": {\"type\": \"object\", \"properties\": {\"length\": {\"type\": \"integer\", \"description\": \"The length of the password\"}, \"include_symbols\": {\"type\": \"boolean\", \"description\": \"Whether to include symbols in the password\"}}, \"required\": [\"length\"]}}, {\"name\": \"create_task\", \"description\": \"Create a new task in a task management system\", \"parameters\": {\"type\": \"object\", \"properties\": {\"title\": {\"type\": \"string\", \"description\": \"The title of the task\"}, \"due_date\": {\"type\": \"string\", \"format\": \"date\", \"description\": \"The due date of the task\"}, \"priority\": {\"type\": \"string\", \"enum\": [\"low\", \"medium\", \"high\"], \"description\": \"The priority of the task\"}}, \"required\": [\"title\", \"due_date\", \"priority\"]}}]"
},
{
"conversations": [
{
"from": "human",
"value": "Can you tell me the latest news headlines for the United States?"
},
{
"from": "function_call",
"value": "{\"name\": \"get_news_headlines\", \"arguments\": {\"country\": \"United States\"}}"
},
{
"from": "observation",
"value": "{\"headlines\": [\"Biden announces new vaccine mandates\", \"Hurricane Ida devastates Louisiana\", \"Apple unveils new iPhone\", \"NASA's Perseverance rover collects first Mars rock sample\"]}"
},
{
"from": "gpt",
"value": "Here are the latest news headlines for the United States:"
},
{
"from": "human",
"value": "That's interesting. What about the news in France?"
},
{
"from": "function_call",
"value": "{\"name\": \"get_news_headlines\", \"arguments\": {\"country\": \"France\"}}"
},
{
"from": "observation",
"value": "{\"headlines\": [\"France recalls ambassadors to US and Australia\", \"French election: Macron's party braces for tough fight\", \"Louvre Museum to undergo major overhaul\", \"France to offer free birth control to all women under 25\"]}"
},
{
"from": "gpt",
"value": "Here are the latest news headlines for France:"
}
],
"tools": "[{\"name\": \"get_news_headlines\", \"description\": \"Get the latest news headlines\", \"parameters\": {\"type\": \"object\", \"properties\": {\"country\": {\"type\": \"string\", \"description\": \"The country for which to fetch news\"}}, \"required\": [\"country\"]}}]"
}
]