[Blocks] Tool variables not getting filled in on p...
# support
z
Hi everyone, and happy new year! I'm facing the problem where the variables set with the liquid language template aren't getting replaced, and instead, I'm getting the raw text on the called endpoint. This only happens with the Tool block, and only on the inputs. Nevertheless, I've found out that if for some reason, the agent tries again to call the tool, from the second time onwards it fulfils the variables properly, it only happens the first time. The problem is that we need the value filled the first time the tool is called, not the second one. For example, if the JSON body is:
Copy code
json
{
  "order_number": "{{ask_order_number.output.order_number | default: -1 }}"
}
Then the first time is called we receive on the server this exact block, without any replacements. The second time we receive:
Copy code
json
{
  "order_number": "8888"
}
Although the real value was set before the first call, as a previous conversation block did replaced the exact template correctly. I've seen other people complain about the same issue, so I hope that this post clarifies a bit of what might be the problem. Please don't hesitate to ask me anything about it, I will try my best to point out the exact problem. Best regards, Antonio
v
@ZamJAM Hello Antonio, and Happy New Year to you too! I'm sorry to hear that you're experiencing issues with the liquid template variables not being replaced correctly on the first call within the Tool block. It's great that you've provided a detailed description of the problem, and it's helpful to know that the issue is specific to the first call and that subsequent calls work as expected. This seems like it could be a bug or a timing issue where the template engine isn't processing the variables before the first call is made. To better assist you, I would need to understand more about the context in which the Tool block is being used and the sequence of events leading up to the call. Could you please provide additional information on the following: 1. The context in which the Tool block is being used. 2. The sequence of events or blocks before the Tool block that sets the variable. 3. Any specific configurations or settings that might be relevant to the Tool block and variable replacement. With this information, I can offer more targeted advice or workarounds. In the meantime, if this is a recurring issue that is affecting your workflow significantly, I would recommend reaching out to the support team for further assistance. They might be able to provide a fix or a patch to resolve the issue promptly. Please let me know how you would like to proceed, and I'm here to help you every step of the way. Best regards, Your Support Bot
You can continue this conversation by mentioning me in the message.
z
Hi @Vapi , 1. In a parent workflow, and the same inside an inner workflow, for all tool calls. 2. I've tried multiple options, covering all possible scenarios: 2.1. To have previously a conversation block, where the variable is assigned, then following the tool, and this problem happens 2.2. To have previously a conversation block, where the variable is already assigned, and then include it in the conversation, which works successfully, then followed by a tool block, where the variable doesn't get replaced again. 2.3. To define multiple variables instead of one, and the same happens. 3. Not much, I have full control over the endpoint, so I can see the complete request, and how it was replaced after the second call as stated before. I think that this seems like a problem for customer support, as it seems to be a bug. I could make the bot try twice, but this seems like a dirty patch instead of a real solution. Please let me know I can help in any way! Best regards, Antonio
v
@ZamJAM Hello Antonio, Thank you for providing a detailed explanation of the scenarios you've tested. It does indeed sound like you're encountering a bug with the Tool block's variable replacement on the first call. Since you've already tried various configurations and the issue persists, reaching out to customer support is the appropriate next step. Customer support will be able to investigate the issue further and potentially identify a bug or provide a solution. In the meantime, as you mentioned, implementing a retry mechanism could serve as a temporary workaround, but it's understandable that you're looking for a more permanent and clean solution. To assist customer support, you can prepare the following information: - A clear description of the issue, including the steps to reproduce it. - Any relevant screenshots or logs that show the problem. - Details of the tests you've already performed. I'm here to help with any further questions you might have, but for this specific issue, please reach out to customer support for more in-depth assistance. Best regards, Your Support Bot
z
Okay @Vapi , I'll contact @User then. How can I open a ticket then?
v
@ZamJAM Sweet. Have a great day!