plano/tests/rest/network_agent.rest
Salman Paracha 88c2bd1851
removing model_server python module to brightstaff (function calling) (#615)
* adding function_calling functionality via rust

* fixed rendered YAML file

* removed model_server from envoy.template and forwarding traffic to bright_staff

* fixed bugs in function_calling.rs that were breaking tests. All good now

* updating e2e test to clean up disk usage

* removing Arch* models to be used as a default model if one is not specified

* if the user sets arch-function base_url we should honor it

* fixing demos as we needed to pin to a particular version of huggingface_hub else the chatbot ui wouldn't build

* adding a constant for Arch-Function model name

* fixing some edge cases with calls made to Arch-Function

* fixed JSON parsing issues in function_calling.rs

* fixed bug where the raw response from Arch-Function was re-encoded

* removed debug from supervisord.conf

* commenting out disk cleanup

* adding back disk space

---------

Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-288.local>
Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-342.local>
2025-11-22 12:55:00 -08:00

441 lines
11 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model_server_endpoint = http://localhost:12000
@archfc_endpoint = https://archfc.katanemo.dev
### single turn function calling all parameters insurance agent summary
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "Get me the summary for devices 123387, 10298437,and 129833 in the last 8 days"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}
### single turn function calling all parameters insurance agent reboot
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "reboot devices 123387, 10298437,and 129833"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}
### single turn function calling no parameters insurance agent summary
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "Get me the summary for my devices"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}
### single turn function calling no parameters insurance agent reboot
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "reboot my devices"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}
### multi turn single function calling all parameters insurance agent summary
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "hi"
},
{
"role": "assistant",
"content": "Certainly! How can I assist you today"
},
{
"role": "user",
"content": "get me a summary for my devices"
},
{
"role": "assistant",
"content": "Definitely. what device ids would you like to see a summary for?"
},
{
"role": "user",
"content": "1231094, 1293818, and 1298023"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}
### multi turn single function calling all paramters insurance agent reboot
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "hi"
},
{
"role": "assistant",
"content": "Certainly! How can I assist you today"
},
{
"role": "user",
"content": "reboot my devices"
},
{
"role": "assistant",
"content": "Definitely. what device ids would you like to reboot?"
},
{
"role": "user",
"content": "1231094, 1293818, and 1298023"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}
### multi turn single function calling all parameters change of intent insurance agent summary
POST {{model_server_endpoint}}/function_calling HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "Can you show me the summary for my devices?"
},
{
"role": "assistant",
"content": "Sure! Can you provide the device IDs you would like a summary for?"
},
{
"role": "user",
"content": "Device IDs are 1231094 and 1293818."
},
{
"role": "assistant",
"content": "For how many days would you like to see the summary? If not specified, Ill use the default of 7 days."
},
{
"role": "user",
"content": "Actually, use devices 1298023 and 1293819 instead, for 5 days."
}
],
"tools": [
{
"type": "function",
"function": {
"name": "device_summary",
"description": "Retrieve network statisitcs for specific devices within a time range",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to retrieve statistics for"
},
"days": {
"type": "int",
"description": "the number of days for which to gather device statistics.",
"default": 7
}
},
"required": ["device_ids"]
}
}
},
{
"type": "function",
"function": {
"name": "reboot_devices",
"description": "Reboot a list of devices",
"parameters": {
"type": "object",
"properties": {
"device_ids": {
"type": "list",
"description": "A list of device indentifiers (IDs) to reboot"
}
}
},
"required": ["device_ids"]
}
}
]
}