Tool calling response result.
# support
p
We are facing an issue with the response of the tool when getting an error. I better explain the issue in this video: https://www.loom.com/share/822f05560c7044eeb4e955e7be8d7029 Thanks.
v
@Paulo Thank you for providing the video explanation of the issue you're facing. I'll be happy to assist you with this. Could you please describe the error you're encountering in text form as well? This will help me understand the specific problem and provide you with the most accurate assistance.
You can continue this conversation by mentioning me in the message.
s
@Paulo could you send over a recent call ID so I can take a look?
p
Sure! Here it is: af663092-1da8-4f7a-850c-be2549a13b03 Thank you!
s
logs
šŸ”µ 17:46:45:840 [user ERROR] tool-calls Server URL Error: Request failed with status code 400 šŸ”µ 17:46:37:445 [user ERROR] tool-calls Server URL Error: Request failed with status code 400 @Paulo Your server is returning a 400 status code for the failed tool calls. Because of this, you don't see any response. You can refer to the same in logs and screenshots. Can you please check your logs once? Do let me know if you require further help. https://cdn.discordapp.com/attachments/1326624688088023192/1327624457136766976/Screenshot_2025-01-11_at_18.34.17.png?ex=6783be20&is=67826ca0&hm=6270ee1b219823af091a750488a4974f1c7e5acdf02e781bea6eafd6e634aa50&
p
message has been deleted
Hi Shubham. We have modified the code to return a 500 status. However, it is still not working. This is the call ID for the last test: 7d774de5-29c0-4d8c-998c-e73d69a85ef4 What should be the status for returning the correct error message? Thank you so much for your attention.
s
@Paulo You must always return a 200 status code. If something is missing or wrong, include that information in the result property and the LLM will generate an appropriate response. Any status code other than 200 will be considered a failed tool call.
p
Hey Shubham. We fixed that, and now it's returning a 200 status, and the message is being generated. However, the message is still not being passed to the agent. The call ID for this specific test is 59884a37-2344-46f4-81a3-36552c8537f9. How should we pass the message to the agent during the call? Thanks. https://cdn.discordapp.com/attachments/1326624688088023192/1328450553457414226/image.png?ex=6786bf7d&is=67856dfd&hm=3ee27c8a14ec0cc2cb05c8294b6721ca08a3fdfec07bc12b81bf91af9646df1b&
Shubham could you provide me with more detailed information on how to fix this issue?
s
logs
šŸ”µ 19:36:26:171 [user LOG] Model called tool: getMenu({"category":"Subs"}) šŸ”µ 19:36:26:175 Server Message Requested...(tool-calls , šŸ”µ 19:36:26:336 Server Message Failed. (https://callselly-to-foodtec-1-paulo-henriq185.replit.app/api/menu/categories). Error: šŸ”µ 19:36:26:337 [user ERROR] tool-calls Server URL Error: Request failed with status code 401 @Paulo can you please check in your server logs what's casuing it to return 401?
@Paulo I will be available tomorrow for office hours https://discord.gg/zVj4GuCZ?event=1327022520775213066