add more changes

This commit is contained in:
Adil Hafeez 2025-03-18 13:32:01 -07:00
parent bbfb44f50c
commit e28af2045f
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
17 changed files with 769 additions and 1 deletions

View file

@ -0,0 +1,36 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"account_balance\", \"description\": \"Get the account balance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}}, \"required\": [\"account_id\"]}}\n{\"name\": \"transfer_funds\", \"description\": \"Transfer funds between accounts\", \"parameters\": {\"type\": \"object\", \"properties\": {\"from_account\": {\"type\": \"string\", \"description\": \"The account to transfer from\"}, \"to_account\": {\"type\": \"string\", \"description\": \"The account to transfer to\"}, \"amount\": {\"type\": \"number\", \"description\": \"The amount to transfer\"}}, \"required\": [\"from_account\", \"to_account\", \"amount\"]}}\n{\"name\": \"account_transactions\", \"description\": \"Get the account transactions\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}, \"start_date\": {\"type\": \"string\", \"description\": \"The start date of the transactions\"}, \"end_date\": {\"type\": \"string\", \"description\": \"The end date of the transactions\"}}, \"required\": [\"account_id\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "what can you do?"
},
{
"role": "assistant",
"content": "I can assist you with tasks related to the functions provided to me, such as retrieving account balances, transferring funds between accounts, and fetching account transactions. Please let me know which specific task you would like help with!"
},
{
"role": "user",
"content": "I want to know balance on my account for account id 11924"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /tool_calls.*account_balance/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,52 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"account_balance\", \"description\": \"Get the account balance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}}, \"required\": [\"account_id\"]}}\n{\"name\": \"transfer_funds\", \"description\": \"Transfer funds between accounts\", \"parameters\": {\"type\": \"object\", \"properties\": {\"from_account\": {\"type\": \"string\", \"description\": \"The account to transfer from\"}, \"to_account\": {\"type\": \"string\", \"description\": \"The account to transfer to\"}, \"amount\": {\"type\": \"number\", \"description\": \"The amount to transfer\"}}, \"required\": [\"from_account\", \"to_account\", \"amount\"]}}\n{\"name\": \"account_transactions\", \"description\": \"Get the account transactions\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}, \"start_date\": {\"type\": \"string\", \"description\": \"The start date of the transactions\"}, \"end_date\": {\"type\": \"string\", \"description\": \"The end date of the transactions\"}}, \"required\": [\"account_id\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "what can you do?"
},
{
"role": "assistant",
"content": "I can assist you with tasks related to the functions provided to me, such as retrieving account balances, transferring funds between accounts, and fetching account transactions. Please let me know which specific task you would like help with!"
},
{
"role": "user",
"content": "I want to know balance on my account for account id 11924"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"account_balance\", \"arguments\": {\"account_id\": \"11924\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'account_balance', 'result': '150,000 USD'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The account balance for account ID 11924 is 150,000 USD."
},
{
"role": "user",
"content": "I want to transfer funds from account 11924 to account 11925"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /required_functions.*transfer_funds.*clarification/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,52 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"account_balance\", \"description\": \"Get the account balance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}}, \"required\": [\"account_id\"]}}\n{\"name\": \"transfer_funds\", \"description\": \"Transfer funds between accounts\", \"parameters\": {\"type\": \"object\", \"properties\": {\"from_account\": {\"type\": \"string\", \"description\": \"The account to transfer from\"}, \"to_account\": {\"type\": \"string\", \"description\": \"The account to transfer to\"}, \"amount\": {\"type\": \"number\", \"description\": \"The amount to transfer\"}}, \"required\": [\"from_account\", \"to_account\", \"amount\"]}}\n{\"name\": \"account_transactions\", \"description\": \"Get the account transactions\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}, \"start_date\": {\"type\": \"string\", \"description\": \"The start date of the transactions\"}, \"end_date\": {\"type\": \"string\", \"description\": \"The end date of the transactions\"}}, \"required\": [\"account_id\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "what can you do?"
},
{
"role": "assistant",
"content": "I can assist you with tasks related to the functions provided to me, such as retrieving account balances, transferring funds between accounts, and fetching account transactions. Please let me know which specific task you would like help with!"
},
{
"role": "user",
"content": "I want to know balance on my account for account id 11924"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"account_balance\", \"arguments\": {\"account_id\": \"11924\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'account_balance', 'result': '150,000 USD'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The account balance for account ID 11924 is 150,000 USD."
},
{
"role": "user",
"content": "thank you"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /help|assist/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,60 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"account_balance\", \"description\": \"Get the account balance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}}, \"required\": [\"account_id\"]}}\n{\"name\": \"transfer_funds\", \"description\": \"Transfer funds between accounts\", \"parameters\": {\"type\": \"object\", \"properties\": {\"from_account\": {\"type\": \"string\", \"description\": \"The account to transfer from\"}, \"to_account\": {\"type\": \"string\", \"description\": \"The account to transfer to\"}, \"amount\": {\"type\": \"number\", \"description\": \"The amount to transfer\"}}, \"required\": [\"from_account\", \"to_account\", \"amount\"]}}\n{\"name\": \"account_transactions\", \"description\": \"Get the account transactions\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}, \"start_date\": {\"type\": \"string\", \"description\": \"The start date of the transactions\"}, \"end_date\": {\"type\": \"string\", \"description\": \"The end date of the transactions\"}}, \"required\": [\"account_id\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "what can you do?"
},
{
"role": "assistant",
"content": "I can assist you with tasks related to the functions provided to me, such as retrieving account balances, transferring funds between accounts, and fetching account transactions. Please let me know which specific task you would like help with!"
},
{
"role": "user",
"content": "I want to know balance on my account for account id 11924"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"account_balance\", \"arguments\": {\"account_id\": \"11924\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'account_balance', 'result': '150,000 USD'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The account balance for account ID 11924 is 150,000 USD."
},
{
"role": "user",
"content": "I want to transfer funds from account 11924 to account 11925"
},
{
"role": "assistant",
"content": "How much would you like to transfer?"
},
{
"role": "user",
"content": "I want to transfer 1000 USD"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /tool_calls.*transfer_funds/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,92 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"account_balance\", \"description\": \"Get the account balance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}}, \"required\": [\"account_id\"]}}\n{\"name\": \"transfer_funds\", \"description\": \"Transfer funds between accounts\", \"parameters\": {\"type\": \"object\", \"properties\": {\"from_account\": {\"type\": \"string\", \"description\": \"The account to transfer from\"}, \"to_account\": {\"type\": \"string\", \"description\": \"The account to transfer to\"}, \"amount\": {\"type\": \"number\", \"description\": \"The amount to transfer\"}}, \"required\": [\"from_account\", \"to_account\", \"amount\"]}}\n{\"name\": \"account_transactions\", \"description\": \"Get the account transactions\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}, \"start_date\": {\"type\": \"string\", \"description\": \"The start date of the transactions\"}, \"end_date\": {\"type\": \"string\", \"description\": \"The end date of the transactions\"}}, \"required\": [\"account_id\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "what can you do?"
},
{
"role": "assistant",
"content": "I can assist you with tasks related to the functions provided to me, such as retrieving account balances, transferring funds between accounts, and fetching account transactions. Please let me know which specific task you would like help with!"
},
{
"role": "user",
"content": "I want to know balance on my account for account id 11924"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"account_balance\", \"arguments\": {\"account_id\": \"11924\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'account_balance', 'result': '150,000 USD'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The account balance for account ID 11924 is 150,000 USD."
},
{
"role": "user",
"content": "I want to transfer funds from account 11924 to account 11925"
},
{
"role": "assistant",
"content": "How much would you like to transfer?"
},
{
"role": "user",
"content": "150 USD pls"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"transfer_funds\", \"arguments\": {\"from_account\": \"11924\", \"to_account\": \"11925\", \"amount\": 150}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'transfer_funds', 'result': 'success'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The funds were transferred successfully."
},
{
"role": "user",
"content": "what is the balance for both of my accounts"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"account_balance\", \"arguments\": {\"account_id\": \"11924\"}}, {\"name\": \"account_balance\", \"arguments\": {\"account_id\": \"11925\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'account_balance', 'result': [{'account_id': '11924', 'balance': '150,000 USD'}, {'account_id': '11925', 'balance': '200,000 USD'}]\n</tool_response>"
},
{
"role": "assistant",
"content": "The account balance for account ID 11924 is 150,000 USD and for account ID 11925 is 200,000 USD."
},
{
"role": "user",
"content": "thank you"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /assist|help|day|welcome/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,28 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"account_balance\", \"description\": \"Get the account balance\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}}, \"required\": [\"account_id\"]}}\n{\"name\": \"transfer_funds\", \"description\": \"Transfer funds between accounts\", \"parameters\": {\"type\": \"object\", \"properties\": {\"from_account\": {\"type\": \"string\", \"description\": \"The account to transfer from\"}, \"to_account\": {\"type\": \"string\", \"description\": \"The account to transfer to\"}, \"amount\": {\"type\": \"number\", \"description\": \"The amount to transfer\"}}, \"required\": [\"from_account\", \"to_account\", \"amount\"]}}\n{\"name\": \"account_transactions\", \"description\": \"Get the account transactions\", \"parameters\": {\"type\": \"object\", \"properties\": {\"account_id\": {\"type\": \"string\", \"description\": \"The account ID\"}, \"start_date\": {\"type\": \"string\", \"description\": \"The start date of the transactions\"}, \"end_date\": {\"type\": \"string\", \"description\": \"The end date of the transactions\"}}, \"required\": [\"account_id\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "I want to know balance on my account for account id 11924"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /tool_calls.*account_balance/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,51 @@
tools = [
{
"name": "account_balance",
"description": "Get the account balance",
"parameters": {
"type": "object",
"properties": {
"account_id": {"type": "string", "description": "The account ID"}
},
"required": ["account_id"],
},
},
{
"name": "transfer_funds",
"description": "Transfer funds between accounts",
"parameters": {
"type": "object",
"properties": {
"from_account": {
"type": "string",
"description": "The account to transfer from",
},
"to_account": {
"type": "string",
"description": "The account to transfer to",
},
"amount": {"type": "number", "description": "The amount to transfer"},
},
"required": ["from_account", "to_account", "amount"],
},
},
{
"name": "account_transactions",
"description": "Get the account transactions",
"parameters": {
"type": "object",
"properties": {
"account_id": {"type": "string", "description": "The account ID"},
"start_date": {
"type": "string",
"description": "The start date of the transactions",
},
"end_date": {
"type": "string",
"description": "The end date of the transactions",
},
},
"required": ["account_id"],
},
},
]

View file

@ -10,7 +10,7 @@ Content-Type: application/json
},
{
"role": "user",
"content": "I need help in scheduling a meeting with Joe and Jane tomorrow at 10am with title 'Project Kickoff'"
"content": "I need help in scheduling a meeting with joe@gmail.com and jane@gmail.com tomorrow at 10am with title 'Project Kickoff'"
}
],
"temperature": 0.6,

View file

@ -0,0 +1,36 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"verify_address\", \"description\": \"Verify the address\", \"parameters\": {\"type\": \"object\", \"properties\": {\"address\": {\"type\": \"string\", \"description\": \"The address to verify\"}}, \"required\": [\"address\"]}}\n{\"name\": \"track_shipment\", \"description\": \"Track the shipment\", \"parameters\": {\"type\": \"object\", \"properties\": {\"tracking_number\": {\"type\": \"string\", \"description\": \"The tracking number\"}}, \"required\": [\"tracking_number\"]}}\n{\"name\": \"generate_label\", \"description\": \"Generate the shipping label\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n{\"name\": \"calculate_shipping_rate\", \"description\": \"Calculate the shipping rate\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "What can you do?"
},
{
"role": "assistant",
"content": "I can help you with various tasks such as verifying addresses, tracking shipments, generating shipping labels, and calculating shipping rates. Would you like assistance with something specific?"
},
{
"role": "user",
"content": "I want to verify the address 123 Main St Redmond WA 98052"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /tool_calls.*verify_address/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,52 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"verify_address\", \"description\": \"Verify the address\", \"parameters\": {\"type\": \"object\", \"properties\": {\"address\": {\"type\": \"string\", \"description\": \"The address to verify\"}}, \"required\": [\"address\"]}}\n{\"name\": \"track_shipment\", \"description\": \"Track the shipment\", \"parameters\": {\"type\": \"object\", \"properties\": {\"tracking_number\": {\"type\": \"string\", \"description\": \"The tracking number\"}}, \"required\": [\"tracking_number\"]}}\n{\"name\": \"generate_label\", \"description\": \"Generate the shipping label\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n{\"name\": \"calculate_shipping_rate\", \"description\": \"Calculate the shipping rate\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "What can you do?"
},
{
"role": "assistant",
"content": "I can help you with various tasks such as verifying addresses, tracking shipments, generating shipping labels, and calculating shipping rates. Would you like assistance with something specific?"
},
{
"role": "user",
"content": "I want to verify the address 123 Main St Redmond WA 98052"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"verify_address\", \"arguments\": {\"address\": \"123 Main St Redmond WA 98052\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'verify_address', 'result': 'success'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The address 123 Main St Redmond WA 98052 is valid."
},
{
"role": "user",
"content": "I want to track the shipment with tracking number 1234567890"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /tool_calls.*track_shipment/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,60 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"verify_address\", \"description\": \"Verify the address\", \"parameters\": {\"type\": \"object\", \"properties\": {\"address\": {\"type\": \"string\", \"description\": \"The address to verify\"}}, \"required\": [\"address\"]}}\n{\"name\": \"track_shipment\", \"description\": \"Track the shipment\", \"parameters\": {\"type\": \"object\", \"properties\": {\"tracking_number\": {\"type\": \"string\", \"description\": \"The tracking number\"}}, \"required\": [\"tracking_number\"]}}\n{\"name\": \"generate_label\", \"description\": \"Generate the shipping label\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n{\"name\": \"calculate_shipping_rate\", \"description\": \"Calculate the shipping rate\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "What can you do?"
},
{
"role": "assistant",
"content": "I can help you with various tasks such as verifying addresses, tracking shipments, generating shipping labels, and calculating shipping rates. Would you like assistance with something specific?"
},
{
"role": "user",
"content": "I want to verify the address 123 Main St Redmond WA 98052"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"verify_address\", \"arguments\": {\"address\": \"123 Main St Redmond WA 98052\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'verify_address', 'result': 'success'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The address 123 Main St Redmond WA 98052 is valid."
},
{
"role": "user",
"content": "I want to track the shipment with tracking number 1234567890"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"track_shipment\", \"arguments\": {\"tracking_number\": \"1234567890\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'track_shipment', 'result': 'shipped'}\n</tool_response>"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /shipped/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,68 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"verify_address\", \"description\": \"Verify the address\", \"parameters\": {\"type\": \"object\", \"properties\": {\"address\": {\"type\": \"string\", \"description\": \"The address to verify\"}}, \"required\": [\"address\"]}}\n{\"name\": \"track_shipment\", \"description\": \"Track the shipment\", \"parameters\": {\"type\": \"object\", \"properties\": {\"tracking_number\": {\"type\": \"string\", \"description\": \"The tracking number\"}}, \"required\": [\"tracking_number\"]}}\n{\"name\": \"generate_label\", \"description\": \"Generate the shipping label\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n{\"name\": \"calculate_shipping_rate\", \"description\": \"Calculate the shipping rate\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "What can you do?"
},
{
"role": "assistant",
"content": "I can help you with various tasks such as verifying addresses, tracking shipments, generating shipping labels, and calculating shipping rates. Would you like assistance with something specific?"
},
{
"role": "user",
"content": "I want to verify the address 123 Main St Redmond WA 98052"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"verify_address\", \"arguments\": {\"address\": \"123 Main St Redmond WA 98052\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'verify_address', 'result': 'success'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The address 123 Main St Redmond WA 98052 is valid."
},
{
"role": "user",
"content": "I want to track the shipment with tracking number 1234567890"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"track_shipment\", \"arguments\": {\"tracking_number\": \"1234567890\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'track_shipment', 'result': 'shipped'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The shipment with tracking number 1234567890 has been shipped."
},
{
"role": "user",
"content": "I want to generate a shipping label"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /required_functions.*generate_label.*clarification/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,84 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"verify_address\", \"description\": \"Verify the address\", \"parameters\": {\"type\": \"object\", \"properties\": {\"address\": {\"type\": \"string\", \"description\": \"The address to verify\"}}, \"required\": [\"address\"]}}\n{\"name\": \"track_shipment\", \"description\": \"Track the shipment\", \"parameters\": {\"type\": \"object\", \"properties\": {\"tracking_number\": {\"type\": \"string\", \"description\": \"The tracking number\"}}, \"required\": [\"tracking_number\"]}}\n{\"name\": \"generate_label\", \"description\": \"Generate the shipping label\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n{\"name\": \"calculate_shipping_rate\", \"description\": \"Calculate the shipping rate\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "What can you do?"
},
{
"role": "assistant",
"content": "I can help you with various tasks such as verifying addresses, tracking shipments, generating shipping labels, and calculating shipping rates. Would you like assistance with something specific?"
},
{
"role": "user",
"content": "I want to verify the address 123 Main St Redmond WA 98052"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"verify_address\", \"arguments\": {\"address\": \"123 Main St Redmond WA 98052\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'verify_address', 'result': 'success'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The address 123 Main St Redmond WA 98052 is valid."
},
{
"role": "user",
"content": "I want to track the shipment with tracking number 1234567890"
},
{
"role": "assistant",
"content": "{\"tool_calls\": [{\"name\": \"track_shipment\", \"arguments\": {\"tracking_number\": \"1234567890\"}}]}"
},
{
"role": "user",
"content": "<tool_response>\n{'name': 'track_shipment', 'result': 'shipped'}\n</tool_response>"
},
{
"role": "assistant",
"content": "The shipment with tracking number 1234567890 has been shipped."
},
{
"role": "user",
"content": "I want to generate a shipping label"
},
{
"role": "assistant",
"content": "Could you please provide the sender's address, the recipient's address, and the weight of the package?"
},
{
"role": "user",
"content": "Sure, sender address is 123 Main St Redmond WA 98052, recipient address is 456 Elm St Seattle WA 98101"
},
{
"role": "assistant",
"content": "Could you please provide me with the weight of the package?"
},
{
"role": "user",
"content": "The weight of the package is 5 lbs"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /tool_calls.*generate_label/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,32 @@
POST http://localhost:8282/v1/chat/completions
Content-Type: application/json
{
"model": "Arch-Function",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to assist with the user query by making one or more function calls if needed.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"verify_address\", \"description\": \"Verify the address\", \"parameters\": {\"type\": \"object\", \"properties\": {\"address\": {\"type\": \"string\", \"description\": \"The address to verify\"}}, \"required\": [\"address\"]}}\n{\"name\": \"track_shipment\", \"description\": \"Track the shipment\", \"parameters\": {\"type\": \"object\", \"properties\": {\"tracking_number\": {\"type\": \"string\", \"description\": \"The tracking number\"}}, \"required\": [\"tracking_number\"]}}\n{\"name\": \"generate_label\", \"description\": \"Generate the shipping label\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n{\"name\": \"calculate_shipping_rate\", \"description\": \"Calculate the shipping rate\", \"parameters\": {\"type\": \"object\", \"properties\": {\"sender\": {\"type\": \"string\", \"description\": \"The address to ship from\"}, \"recipient\": {\"type\": \"string\", \"description\": \"The address to ship to\"}, \"weight\": {\"type\": \"number\", \"description\": \"The weight of the package\"}}, \"required\": [\"sender\", \"recipient\", \"weight\"]}}\n</tools>\n\nYour task is to decide which functions are needed and collect missing parameters if necessary.\n\nBased on your analysis, provide your response in one of the following JSON formats:\n1. If no functions are needed:\n```\n{\"response\": \"Your response text here\"}\n```\n2. If functions are needed but some required parameters are missing:\n```\n{\"required_functions\": [\"func_name1\", \"func_name2\", ...], \"clarification\": \"Text asking for missing parameters\"}\n```\n3. If functions are needed and all required parameters are available:\n```\n{\"tool_calls\": [{\"name\": \"func_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},... (more tool calls as required)]}\n```"
},
{
"role": "user",
"content": "What can you do?"
}
],
"temperature": 0.6,
"top_p": 1.0,
"top_k": 10
}
# resp
# it should be something like .. "I can help you with various tasks such as verifying addresses, tracking ...
# but more often I see {"tool_calls": [{"name": "verify_address", "arguments": {"address": "123 Main St"}}, {"name": "track_shipment", "arguments": {"tracking_number": "ABC123"}}, {"name": "generate_label", "arguments": {"sender": "123 Main St", "recipient": "456 Elm St", "weight": 10}}, {"name": "calculate_shipping_rate", "arguments": {"sender": "123 Main St", "recipient": "456 Elm St", "weight": 10}}]}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^Arch-Function/
jsonpath "$.usage" != null
# ignore param value check for now
jsonpath "$.choices[0].message.content" matches /help/
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,65 @@
tools = [
{
"name": "verify_address",
"description": "Verify the address",
"parameters": {
"type": "object",
"properties": {
"address": {"type": "string", "description": "The address to verify"}
},
"required": ["address"],
},
},
{
"name": "track_shipment",
"description": "Track the shipment",
"parameters": {
"type": "object",
"properties": {
"tracking_number": {
"type": "string",
"description": "The tracking number",
}
},
"required": ["tracking_number"],
},
},
{
"name": "generate_label",
"description": "Generate the shipping label",
"parameters": {
"type": "object",
"properties": {
"sender": {"type": "string", "description": "The address to ship from"},
"recipient": {
"type": "string",
"description": "The address to ship to",
},
"weight": {
"type": "number",
"description": "The weight of the package",
},
},
"required": ["sender", "recipient", "weight"],
},
},
{
"name": "calculate_shipping_rate",
"description": "Calculate the shipping rate",
"parameters": {
"type": "object",
"properties": {
"sender": {"type": "string", "description": "The address to ship from"},
"recipient": {
"type": "string",
"description": "The address to ship to",
},
"weight": {
"type": "number",
"description": "The weight of the package",
},
},
"required": ["sender", "recipient", "weight"],
},
},
]