how to set up tools
# support
a
Migrating from functions to tools, how to set up the payload sent to make? I have theese tools setup, but i need a formated json for them @Vapi https://cdn.discordapp.com/attachments/1264350396399353876/1264350397020115105/Snimka_obrazovky_2024-07-21_001615.png?ex=669d8d91&is=669c3c11&hm=76e552bbeec82b830d70d0dd4739574ad206565850300355488e64f6dd8d0104&
@Vapi
v
@Adam To set up the payload for the tools you're migrating to, you'll need to format your JSON according to the specifications of each tool. The JSON payload typically includes the parameters that the tool expects. Here's a general structure for how you might format your JSON payload for a tool:
Copy code
json
{
  "tool_name": {
    "parameter1": "value1",
    "parameter2": "value2",
    // ... additional parameters as required by the tool
  }
}
For each tool, replace
tool_name
with the actual name of the tool, and include each parameter that the tool requires with its corresponding value. If you can provide me with the specific tools you're working with and their required parameters, I can help you construct the exact JSON payload you need.
@Adam Certainly! To set up the payload for migrating from functions to tools in Make, you'll need to format your JSON payload according to the structure of the tools you have set up. Since you haven't provided the specific details of the tools, I'll give you a generic example of how you might structure your JSON payload. Here's a sample JSON payload for a tool that wraps multiple function calls using the
multi_tool_use.parallel
tool:
Copy code
json
{
  "type": "function",
  "messages": [
    // ... your messages here ...
  ],
  "function": {
    "namespace": "multi_tool_use",
    "function_name": "parallel",
    "parameters": {
      "tool_uses": [
        {
          "recipient_name": "functions.close_ticket",
          "parameters": {
            // ... parameters for close_ticket function ...
          }
        },
        // ... other tool uses here ...
      ]
    }
  },
  "async": false,
  "server": {
    // ... server configuration here ...
  }
}
In this payload: -
type
is set to
"function"
because you're setting up an API call. -
messages
would contain any messages that are part of the tool's operation. -
function
specifies the
multi_tool_use.parallel
tool, which allows you to run multiple tools in parallel. -
tool_uses
is an array of the tools you want to run, with each tool specified by its
recipient_name
and the
parameters
it requires. -
async
indicates whether the call should be asynchronous or not. -
server
contains the server configuration details. Please replace the placeholder comments with the actual messages, parameters, and server configuration details relevant to your tools. If you need assistance with specific tools or parameters, feel free to provide more details, and I'll be happy to help you format the JSON payload accordingly.
You can continue this conversation by mentioning me in the message.
a
when testing the payload in make everything goes well, when acctualy calling the bot, object: empty and json: null
@Vapi
v
@Adam It seems like there might be an issue with how the payload is being sent or received when you're actually calling the bot. Here are a few steps you can take to troubleshoot this issue: 1. **Check the Content-Type Header**: Ensure that when you're calling the bot, the
Content-Type
header is set to
application/json
. This tells the server that you're sending JSON data. 2. **Validate the JSON**: Before sending the payload, validate that your JSON is correctly formatted. You can use online JSON validators to check for any syntax errors. 3. **Inspect the Request**: If you're using a tool like Postman or a similar HTTP client, inspect the request to make sure that the JSON payload is included in the body of the request. 4. **Check Server Logs**: If possible, check the server logs to see if there are any errors or warnings that could give you a clue as to why the payload is not being received correctly. 5. **Review API Documentation**: Double-check the API documentation to ensure that you're following all the required steps for sending a payload to the bot. 6. **Test with a Minimal Payload**: Try sending a minimal payload that you know works in the testing environment to see if the issue persists. This can help you isolate whether the problem is with the payload or the way it's being sent. 7. **Check for Proxy or Firewall Issues**: If you're calling the bot from a different network environment than where you tested it, there might be a proxy or firewall that's stripping out the body of the request. If after these steps you're still facing issues, please provide more details about how you're calling the bot and the exact steps you're taking. This will help me assist you better. If you're unable to resolve the issue, you may need to reach out to the support team for further assistance.
s
@Adam please checkout this video https://youtu.be/4fLe3sRH_uI'
7 Views